From 98d2a83cb10b53fe7c796e3c4dd63b09751e4e7c Mon Sep 17 00:00:00 2001 From: Dat Hoang Date: Thu, 26 Apr 2018 16:48:46 +0700 Subject: [PATCH] Update 1.4.2 - Fix the fatal error when WooCommerce PayPal Express Checkout Gateway is not active Related #53 and #54 --- readme.md | 8 ++++++++ readme.txt | 15 ++++++++++----- woo-viet.php | 7 ++++--- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/readme.md b/readme.md index fcb1f90..59a46e9 100644 --- a/readme.md +++ b/readme.md @@ -8,6 +8,14 @@ Xem phiên bản tiếng Việt tại đây https://vi.wordpress.org/plugins/woo ## Changelog +### 1.4.2 - 2018.04.26 = + +* Fix the fatal error when WooCommerce PayPal Express Checkout Gateway is not active. + +### 1.4.1 - 2018.04.26 = + +* Fix the SVN command, missing some files on WP.org repo. + ### 1.4 - 2018.04.24 * Fix the on-hold order issue with PayPal Standard. diff --git a/readme.txt b/readme.txt index 08942d3..803cb49 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: OnePay WooCommerce, OnePay Vietnam, WooCommerce Vietnam, vietnam, vietname Requires at least: 4.3 Tested up to: 4.9.5 Requires PHP: 5.6 -Stable tag: 1.4 +Stable tag: 1.4.2 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -16,9 +16,6 @@ Add features to WooCommerce stores having anything related to Vietnam: currency, Xem phiên bản tiếng Việt tại đây [https://vi.wordpress.org/plugins/woo-viet/](https://vi.wordpress.org/plugins/woo-viet/) -**NEW FEATURE**: -Add [the OnePay domestic (local ATM cards) gateway](http://onepay.com.vn/). - = FEATURES = * Change the VND currency symbol `đ` to anything, e.g: `VND`, `VNĐ`, `đồng`, etc. @@ -26,7 +23,7 @@ Add [the OnePay domestic (local ATM cards) gateway](http://onepay.com.vn/). * Add districts to Vietnam provinces. * Convert `000` of prices to `K` (or anything). E.g: `50000` (VND) will be `50K` (VND), or `50 thousand` (VND). * Support `VND` for [the PayPal Standard gateway](https://docs.woocommerce.com/document/paypal-standard/). Convert `VND` prices to any PayPal supported currency before sending visitors to the PayPal pages. -* Support `VND` for [the PayPal Express Checkout gateway](https://docs.woocommerce.com/document/paypal-express-checkout/) +* Support `VND` for [the PayPal Express Checkout gateway](https://docs.woocommerce.com/document/paypal-express-checkout/). * Add [the OnePay domestic (local ATM cards) gateway](http://onepay.com.vn/). Implement all methods in [the official documents](https://mtf.onepay.vn/developer/?page=modul_noidia_php): QueryDR, IPN, and Return URL. = ROAD MAP = @@ -76,6 +73,14 @@ Follow these steps to install and use the plugin: == Changelog == += 1.4.2 - 2018.04.26 = + +* Fix the fatal error when WooCommerce PayPal Express Checkout Gateway is not active. + += 1.4.1 - 2018.04.26 = + +* Fix the SVN command, missing some files on WP.org repo. + = 1.4 - 2018.04.24 = * Fix the on-hold order issue with PayPal Standard. diff --git a/woo-viet.php b/woo-viet.php index b81dc74..30e7dac 100644 --- a/woo-viet.php +++ b/woo-viet.php @@ -7,7 +7,7 @@ * Author URI: https://profiles.wordpress.org/htdat * Text Domain: woo-viet * Domain Path: /languages - * Version: 1.4 + * Version: 1.4.2 * * WC requires at least: 2.6 * WC tested up to: 2.3 @@ -211,8 +211,9 @@ class WooViet { } // Check if "Support VND for the PayPal Express Checkout gateway" is enabled - if ( 'yes' == $settings['vnd_paypal_express_checkout']['enabled'] ) { - include( WOO_VIET_DIR . 'inc/class-wooviet-vnd-paypal-express-checkout.php' ); + if ( 'yes' == $settings['vnd_paypal_express_checkout']['enabled'] + AND class_exists( 'WC_Gateway_PPEC_Plugin' ) + ) { include( WOO_VIET_DIR . 'inc/class-wooviet-vnd-paypal-express-checkout.php' ); $this->VND_PayPal_Express_Checkout = new WooViet_VND_PayPal_Express_Checkout( $settings['vnd_paypal_express_checkout']['rate'], $settings['vnd_paypal_express_checkout']['currency']