Changeset 2605645
- Timestamp:
- 09/27/2021 01:27:51 PM (4 years ago)
- Location:
- bring4you/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (1 diff)
-
bring4you.php (modified) (3 diffs)
-
class/B4Y-shipping.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bring4you/trunk/README.txt
r2599188 r2605645 44 44 * Add task creation 45 45 46 47 46 = 1.0.3 = 48 47 * Bug Correction 48 49 = 1.0.4 = 50 * Bug Correction -
bring4you/trunk/bring4you.php
r2599188 r2605645 17 17 * Plugin URI: https://gitlab.com/bring4you/b4u-wordpress-plugin/-/archive/master/b4u-wordpress-plugin-master.zip 18 18 * Description: Module permettant d'ajouter le transporteur Bring4You à votre installation Woocommerce 19 * Version: 1.0. 319 * Version: 1.0.4 20 20 * Author: Bring4You 21 21 * Author URI: http://bring4you.com/ … … 38 38 * Rename this for your plugin and update it as you release new versions. 39 39 */ 40 define( 'BRING4YOU_VERSION', '1.0. 3' );40 define( 'BRING4YOU_VERSION', '1.0.4' ); 41 41 42 42 /** … … 355 355 { 356 356 jQuery.ajax({ 357 url: "http ://pelias.bring4you.com/v1/autocomplete",357 url: "https://pelias.bring4you.com/v1/autocomplete", 358 358 method: "GET", 359 359 dataType: "json", -
bring4you/trunk/class/B4Y-shipping.php
r2599188 r2605645 47 47 $cats = get_option('b4y_plugin_setting_cats'); 48 48 49 foreach($products as $product) 50 { 51 $terms = get_the_terms($product['data']->get_id(), 'product_cat' ); 52 53 $has_one_cat_authorize = false; 54 55 foreach ($terms as $term ) { 56 $product_cat_id = $term->term_id; 49 50 if($products){ 51 foreach($products as $product) 52 { 53 $terms = get_the_terms($product['data']->get_id(), 'product_cat' ); 57 54 58 if(in_array($product_cat_id ,$cats)) 59 $has_one_cat_authorize = true; 60 } 61 62 if(!$has_one_cat_authorize) 63 { 64 $authorize = false; 55 $has_one_cat_authorize = false; 56 57 if($terms){ 58 foreach ($terms as $term ) { 59 $product_cat_id = $term->term_id; 60 61 if(in_array($product_cat_id ,$cats)) 62 $has_one_cat_authorize = true; 63 } 64 65 if(!$has_one_cat_authorize) 66 { 67 $authorize = false; 68 } 69 } 70 else 71 { 72 $authorize = true; 73 } 65 74 } 66 75 }
Note: See TracChangeset
for help on using the changeset viewer.