From c3b665cd51aeab3b2be7acb58000867103fef6e1 Mon Sep 17 00:00:00 2001 From: Almira Krdzic Date: Fri, 19 Oct 2018 20:50:55 +0200 Subject: [PATCH] test --- .../wiaas/includes/class-wiaas-shop.php | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/backend/app/plugins/wiaas/includes/class-wiaas-shop.php b/backend/app/plugins/wiaas/includes/class-wiaas-shop.php index 2310777..0a085f4 100644 --- a/backend/app/plugins/wiaas/includes/class-wiaas-shop.php +++ b/backend/app/plugins/wiaas/includes/class-wiaas-shop.php @@ -178,21 +178,21 @@ class Wiaas_Shop { private static function _maybe_create_shop($owner_id) { $shop_name = 'wiaas_shop_' . $owner_id; - $attribute_id = wc_attribute_taxonomy_id_by_name($shop_name); - - if ($attribute_id === 0) { - // create shop attribute - wc_create_attribute(array( 'slug' => $shop_name, 'name' => 'Shop' )); - - $taxonomy_name = wc_attribute_taxonomy_name($shop_name); - - // since attribute taxonomies are registered once on load - // we will register new attribute taxonomy here so default catalogue can be added - register_taxonomy($taxonomy_name, array('product')); - - // add default catalogue option to shop - wp_insert_term( 'Default Catalogue', $taxonomy_name); - } +// $attribute_id = wc_attribute_taxonomy_id_by_name($shop_name); +// +// if ($attribute_id === 0) { +// // create shop attribute +// wc_create_attribute(array( 'slug' => $shop_name, 'name' => 'Shop' )); +// +// $taxonomy_name = wc_attribute_taxonomy_name($shop_name); +// +// // since attribute taxonomies are registered once on load +// // we will register new attribute taxonomy here so default catalogue can be added +// register_taxonomy($taxonomy_name, array('product')); +// +// // add default catalogue option to shop +// wp_insert_term( 'Default Catalogue', $taxonomy_name); +// } } /**