diff --git a/woocommerce-for-vietnam.php b/woocommerce-for-vietnam.php index a31f971..8b733d1 100644 --- a/woocommerce-for-vietnam.php +++ b/woocommerce-for-vietnam.php @@ -75,12 +75,42 @@ class WooViet { * @since 1.0 */ public function __construct() { - add_action( 'init', array( $this, 'i18n' ) ); add_action( 'init', array( $this, 'init' ) ); - } - public function init() { + /** + * Throw a notice if WooCommerce is NOT active + */ + 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' ); + + printf( '
%2$s