Changeset 3130143
- Timestamp:
- 08/02/2024 03:38:37 PM (20 months ago)
- Location:
- gholab/trunk
- Files:
-
- 3 edited
-
gholab.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
src/Helpers/Helpers.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
gholab/trunk/gholab.php
r3130067 r3130143 4 4 Plugin URI: https://webone.co/ 5 5 Description: قلاب، افزونه همگام سازی محصولات فروشگاه وردپرسی با سابت قلاب 6 Version: 1.1. 06 Version: 1.1.1 7 7 Requires at least: 6.4 8 8 Requires PHP: 7.4 … … 18 18 } 19 19 20 define('GHOLAB_PLUGIN_VERSION', '1.1. 0');20 define('GHOLAB_PLUGIN_VERSION', '1.1.1'); 21 21 define('GHOLAB_PLUGIN_FILE', __FILE__); 22 22 define('GHOLAB_PLUGIN_DIR_PATH', plugin_dir_path(GHOLAB_PLUGIN_FILE)); -
gholab/trunk/readme.txt
r3130067 r3130143 5 5 Requires at least: 6.4 6 6 Tested up to: 6.6 7 Stable tag: 1.1. 07 Stable tag: 1.1.1 8 8 Requires PHP: 7.4 9 9 License: GPLv2 or later -
gholab/trunk/src/Helpers/Helpers.php
r3130058 r3130143 138 138 $productData['attributes'] = []; 139 139 foreach ($product->get_attributes() as $attr) { 140 $productData['attributes'][] = [ 141 'name' => $attr->get_name(), 142 'options' => $attr->get_options() 143 ]; 140 if ("pa_" === substr($attr->get_name(), 0, 3)) { 141 $attribute = [ 142 'name' => substr($attr->get_name(), 3), 143 'label' => wc_attribute_label($attr->get_name()), 144 'options' => wc_get_product_terms($product->id, $attr->get_name(), ['fields' => 'names']) 145 ]; 146 } else { 147 $attribute = [ 148 'name' => $attr->get_name(), 149 'label' => wc_attribute_label($attr->get_name()), 150 'options' => $attr->get_options() 151 ]; 152 } 153 $productData['attributes'][] = $attribute; 144 154 } 145 155
Note: See TracChangeset
for help on using the changeset viewer.