Remove shop on org delete

This commit is contained in:
Almira Krdzic
2018-10-19 20:00:40 +02:00
parent a5a795af93
commit 5d8e759e80
3 changed files with 25 additions and 1 deletions

View File

@@ -154,4 +154,15 @@ class Wiaas_Shop_DB {
return $shops;
}
public static function remove_shop($owner_id) {
global $wpdb;
$wpdb->query(
$wpdb->prepare(
"DELETE FROM {$wpdb->prefix}wiaas_shop_customer_relationships
WHERE shop_owner_id = %d",
$owner_id )
);
}
}