mirror of
https://github.com/10h30/woo-viet.git
synced 2026-06-05 15:09:49 +09:00
Reformat the code again
This commit is contained in:
@@ -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
@@ -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/' );
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user