Plugin Directory

Changeset 2461837


Ignore:
Timestamp:
01/24/2021 04:45:33 PM (5 years ago)
Author:
quadpay
Message:

fixed an error when trying to get the billing country / tested up to WooCommerce 5.0.0-beta

Location:
quadpay-gateway-for-woocommerce
Files:
15 added
2 edited

Legend:

Unmodified
Added
Removed
  • quadpay-gateway-for-woocommerce/trunk/quadpay.php

    r2456223 r2461837  
    55Author: QuadPay, Inc.
    66Author URI: https://www.quadpay.com
    7 Version: 1.3.10
     7Version: 1.3.11
    88WC requires at least: 3.1.0
    9 WC tested up to: 4.9.0
     9WC tested up to: 5.0.0
    1010*/
    1111
     
    393393            </table><!--/.form-table-->
    394394            <?php
    395 
    396 
    397 
    398 
    399 
    400395        } // End admin_options()
    401396
     
    855850                $billing_country = $woocommerce->customer->country;
    856851            } else {
    857                 $billing_country = WC()->customer->get_billing_country();
    858             }
    859 
    860             if ( ! $pbi || $billing_country != null && $billing_country != 'US' && $billing_country != 'CA' ) {
     852                 // make sure to call the member function only if not null
     853                 // @since 1.3.11
     854                if ( null !== WC()->customer && null !== WC()->customer->get_billing_country() )
     855                    $billing_country = WC()->customer->get_billing_country();
     856            }
     857
     858            if ( ! $pbi || ( null != $billing_country || empty( $billing_country ) ) && 'US' != $billing_country  && 'CA' != $billing_country ) {
    861859                unset( $gateways['quadpay'] );
    862860            }
  • quadpay-gateway-for-woocommerce/trunk/readme.txt

    r2456223 r2461837  
    44* Requires at least: 4.7
    55* Tested up to: 5.6.0
    6 * Stable tag: 1.3.10
     6* Stable tag: 1.3.11
    77* Requires PHP: 7.0
    88* License: GPLv3
     
    5353* none
    5454
     55= 1.3.11 =
     56* Fix - fixed an error when trying to get the billing country
     57* Compatibility - tested up to WooCommerce 5.0.0-beta
     58
    5559= 1.3.10 =
    5660* Tweak - added new QuadPay branding
Note: See TracChangeset for help on using the changeset viewer.