Changeset 3217706
- Timestamp:
- 01/06/2025 12:51:32 PM (14 months ago)
- Location:
- spreadr-for-woocomerce
- Files:
-
- 9 added
- 3 edited
-
tags/1.0.6 (added)
-
tags/1.0.6/includes (added)
-
tags/1.0.6/includes/class-spreadr-install.php (added)
-
tags/1.0.6/includes/class-spreadr.php (added)
-
tags/1.0.6/includes/spreadr-core-functions.php (added)
-
tags/1.0.6/includes/spreadr-frontend-functions.php (added)
-
tags/1.0.6/includes/spreadr-update-default-settings.php (added)
-
tags/1.0.6/readme.txt (added)
-
tags/1.0.6/spreadr.php (added)
-
trunk/includes/spreadr-core-functions.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/spreadr.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
spreadr-for-woocomerce/trunk/includes/spreadr-core-functions.php
r3206748 r3217706 139 139 } elseif ($meta['key'] == 'spreadr_category') { 140 140 141 wp_set_object_terms($post_id, $meta['value'], 'product_cat'); 141 $category_name = $meta['value']; 142 143 // Check if the category exists by name 144 $category = get_term_by( 'name', $category_name, 'product_cat' ); 145 146 if ( ! $category ) { 147 // Create the category if it doesn't exist 148 $category_id = wp_insert_term( $category_name, 'product_cat' ); 149 150 // Handle potential errors during category creation 151 if ( is_wp_error( $category_id ) ) { 152 error_log( 'Error creating category: ' . $category_id->get_error_message() ); 153 return; 154 } 155 156 // Get the term_id of the newly created category 157 $category_id = $category_id['term_id']; 158 } else { 159 // Use the existing category's term_id 160 $category_id = $category->term_id; 161 } 162 163 // Assign the category to the product 164 wp_set_object_terms( $post_id, (int) $category_id, 'product_cat', true ); 142 165 } 143 166 -
spreadr-for-woocomerce/trunk/readme.txt
r3206748 r3217706 87 87 == Changelog == 88 88 89 = 1.0.6 - January 6, 2025 = 90 * Fixed Category Issue. 91 89 92 = 1.0.5 - December 12, 2024 = 90 93 * Security Fixes: -
spreadr-for-woocomerce/trunk/spreadr.php
r3206748 r3217706 5 5 * Plugin URI: https://spreadr.co/woocommerce 6 6 * Description: Use Spreadr Plugin to import products from Amazon to your WooCommerce store. Earn commissions via Amazon Affiliate Program or run your dropshipping business. 7 * Version: 1.0. 57 * Version: 1.0.6 8 8 * Author: spreadr 9 9 * Author URI: https://spreadr.co
Note: See TracChangeset
for help on using the changeset viewer.