From e86e84258606b761a04f1ce96908ba64e6950948 Mon Sep 17 00:00:00 2001 From: Dat Hoang Date: Sun, 1 Jan 2017 15:19:30 +0700 Subject: [PATCH] Reformat the code again --- inc/class-wooviet-vnd-paypal-standard.php | 2 +- woocommerce-for-vietnam.php | 26 +++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/inc/class-wooviet-vnd-paypal-standard.php b/inc/class-wooviet-vnd-paypal-standard.php index a88d2f5..6fe9aca 100644 --- a/inc/class-wooviet-vnd-paypal-standard.php +++ b/inc/class-wooviet-vnd-paypal-standard.php @@ -33,7 +33,7 @@ class WooViet_VND_Paypal_Standard { public function __construct( $exchange_rate_to_vnd = 22770, $paypal_currency ) { $this->exchange_rate_to_vnd = (int) $exchange_rate_to_vnd; - $this->paypal_currency = $paypal_currency; + $this->paypal_currency = $paypal_currency; // Add VND to the Paypal supported currencies add_filter( 'woocommerce_paypal_supported_currencies', array( $this, 'add_vnd_paypal_valid_currency' ) ); diff --git a/woocommerce-for-vietnam.php b/woocommerce-for-vietnam.php index 8b733d1..77656df 100644 --- a/woocommerce-for-vietnam.php +++ b/woocommerce-for-vietnam.php @@ -81,11 +81,11 @@ class WooViet { /** * Throw a notice if WooCommerce is NOT active */ - public function notice_if_not_woocommerce(){ + public function notice_if_not_woocommerce() { $class = 'notice notice-error'; - $message = __( 'WooCommerce for Vietnam is not running because WooCommerce is not active. Please activate both plugins', - 'woocommerce-for-vietnam' ); + $message = __( 'WooCommerce for Vietnam is not running because WooCommerce is not active. Please activate both plugins', + 'woocommerce-for-vietnam' ); printf( '

%2$s

', $class, $message ); } @@ -93,7 +93,7 @@ class WooViet { /** * Run this method under the "init" action */ - public function init(){ + public function init() { // Load the localization feature $this->i18n(); @@ -103,10 +103,18 @@ class WooViet { $this->main(); } else { // Throw a notice if WooCommerce is NOT active - add_action( 'admin_notices', array($this, 'notice_if_not_woocommerce') ); + add_action( 'admin_notices', array( $this, 'notice_if_not_woocommerce' ) ); } } + /** + * Localize the plugin + * @since 1.0 + */ + public function i18n() { + load_plugin_textdomain( 'freshfunbits', false, basename( dirname( __FILE__ ) ) . '/languages/' ); + } + /** * The main method to load the components */ @@ -160,12 +168,4 @@ class WooViet { return get_option( 'woocommerce-for-vietnam', self::$default_settings ); } - /** - * Localize the plugin - * @since 1.0 - */ - public function i18n() { - load_plugin_textdomain( 'freshfunbits', false, basename( dirname( __FILE__ ) ) . '/languages/' ); - } - } \ No newline at end of file