WordPress.org

Plugin Directory

Changeset 1645505


Ignore:
Timestamp:
04/26/17 07:13:45 (5 weeks ago)
Author:
RistoNiinemets
Message:

compatible with WC 3

Location:
estonian-banklinks-for-woocommerce/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • estonian-banklinks-for-woocommerce/trunk/estonian-banklinks-for-woocommerce.php

    r1622939 r1645505  
    44    Plugin URI: https://wordpress.org/plugins/estonian-banklinks-for-woocommerce/ 
    55    Description: Extends WooCommerce with most commonly used Estonian banklinks. 
    6     Version: 1.3 
     6    Version: 1.3.1 
    77    Author: Konekt OÜ 
    88    Author URI: https://www.konekt.ee 
  • estonian-banklinks-for-woocommerce/trunk/includes/abstracts/class-wc-banklink.php

    r1358640 r1645505  
    140140     */ 
    141141    function is_available() { 
    142         return $this->get_option( 'enabled', 'no' ) != 'no' && array_intersect( array( 'all', WC()->customer->get_country() ), $this->get_option( 'countries' ) ); 
     142        if( WC()->customer == null ) { 
     143            return false; 
     144        } 
     145 
     146        // Get customer country based on WooCommerce version 
     147        if( version_compare( WC_VERSION, '3.0', '>' ) ) { 
     148            $customer_country = WC()->customer->get_billing_country(); 
     149            $this->debug( 'a' ); 
     150        } 
     151        else { 
     152            $customer_country = WC()->customer->get_country(); 
     153            $this->debug( 'b' ); 
     154        } 
     155 
     156        return $this->get_option( 'enabled', 'no' ) != 'no' && array_intersect( array( 'all', $customer_country ), $this->get_option( 'countries' ) ); 
    143157    } 
    144158 
  • estonian-banklinks-for-woocommerce/trunk/readme.txt

    r1622939 r1645505  
    33Tags: woocommerce, estonia, banklink, pangalink, payment gateway 
    44Requires at least: 4.1 
    5 Tested up to: 4.7.3 
    6 Stable tag: 1.3 
     5Tested up to: 4.7.4 
     6Stable tag: 1.3.1 
    77License: GPLv2 or later 
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    3838== Changelog == 
    3939 
     40= 1.3.1 = 
     41* Compability with WooCommerce 3.0.x 
     42 
    4043= 1.3 = 
    4144* Liisi ID via IPIZZA protocol. 
Note: See TracChangeset for help on using the changeset viewer.