Reformat the code again

This commit is contained in:
Dat Hoang
2017-01-01 15:19:30 +07:00
parent 4d886efc3e
commit e86e842586
2 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -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' ) );
+13 -13
View File
@@ -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( '<div class="%1$s"><p><strong>%2$s</strong></p></div>', $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/' );
}
}