Plugin Directory

Changeset 2605645


Ignore:
Timestamp:
09/27/2021 01:27:51 PM (4 years ago)
Author:
bring4you
Message:

Bug Correction

Location:
bring4you/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • bring4you/trunk/README.txt

    r2599188 r2605645  
    4444* Add task creation
    4545
    46 
    4746= 1.0.3 =
    4847* Bug Correction
     48
     49= 1.0.4 =
     50* Bug Correction
  • bring4you/trunk/bring4you.php

    r2599188 r2605645  
    1717 * Plugin URI:        https://gitlab.com/bring4you/b4u-wordpress-plugin/-/archive/master/b4u-wordpress-plugin-master.zip
    1818 * Description:       Module permettant d'ajouter le transporteur Bring4You à votre installation Woocommerce
    19  * Version:           1.0.3
     19 * Version:           1.0.4
    2020 * Author:            Bring4You
    2121 * Author URI:        http://bring4you.com/
     
    3838 * Rename this for your plugin and update it as you release new versions.
    3939 */
    40 define( 'BRING4YOU_VERSION', '1.0.3' );
     40define( 'BRING4YOU_VERSION', '1.0.4' );
    4141
    4242/**
     
    355355                {
    356356                    jQuery.ajax({
    357                         url: "http://pelias.bring4you.com/v1/autocomplete",
     357                        url: "https://pelias.bring4you.com/v1/autocomplete",
    358358                        method: "GET",
    359359                        dataType: "json",
  • bring4you/trunk/class/B4Y-shipping.php

    r2599188 r2605645  
    4747        $cats = get_option('b4y_plugin_setting_cats');
    4848       
    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' );
    5754               
    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                }
    6574            }
    6675        }
Note: See TracChangeset for help on using the changeset viewer.