Plugin Directory

Changeset 2687799


Ignore:
Timestamp:
03/02/2022 08:34:13 PM (4 years ago)
Author:
wpconcierges
Message:

fixing if woocommerce is null

Location:
autopopulate-checkout-for-woocommerce/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • autopopulate-checkout-for-woocommerce/trunk/README.txt

    r2687791 r2687799  
    55Requires at least: 3.0.1
    66Tested up to: 5.9.1
    7 Stable tag: 1.0.4
     7Stable tag: 1.0.5
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4545
    4646== Changelog ==
     47= 1.0.5 =
    4748= 1.0.4 =
    4849* Checking if woocommerce is null
  • autopopulate-checkout-for-woocommerce/trunk/autopopulate-checkout-woo.php

    r2687793 r2687799  
    1717 * Plugin URI:        https://www.wpconcierges.com/plugins/autopopulate-checkout-woo/
    1818 * Description:       Pass in values for shipping, billing, to any page of your site and the plugin will create a customer session that is used on the Woocommerce Checkout page.
    19  * Version:           1.0.4
     19 * Version:           1.0.5
    2020 * Author:            WpConcierges
    2121 * Author URI:        https://www.wpconcierges.com/plugins/
  • autopopulate-checkout-for-woocommerce/trunk/includes/class-autopopulate-checkout-woo.php

    r2687793 r2687799  
    7171            $this->version = AUTOPOPULATE_CHECKOUT_WOO_VERSION;
    7272        } else {
    73             $this->version = '1.0.4';
     73            $this->version = '1.0.5';
    7474        }
    7575        $this->plugin_name = $this->autopopulate_checkout_woo = 'autopopulate-checkout-woo';
  • autopopulate-checkout-for-woocommerce/trunk/public/class-autopopulate-checkout-woo-public.php

    r2687791 r2687799  
    110110  private function set_customer_address_field($field_type,$set_value){
    111111    global $woocommerce;
    112     if(!is_null($woocommerce)) {
     112    if(!is_null($woocommerce)  && !is_null($woocommerce->customer)) {
    113113    switch($field_type){
    114114      case 'billing-first-name':
     
    217217        global $woocommerce;
    218218       
    219         if(!is_null($woocommerce)){
     219        if(!is_null($woocommerce) && !is_null($woocommerce->customer)){
    220220        if(strlen($woocommerce->customer->get_billing_first_name()))
    221221    $fields['billing']['billing_first_name']['default'] = $woocommerce->customer->get_billing_first_name();
Note: See TracChangeset for help on using the changeset viewer.