diff --git a/gulpfile.js b/gulpfile.js index 65a09f3..8ef89d6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -11,7 +11,7 @@ const webpackStream = require( 'webpack-stream' ); const sourceFiles = 'src/', sourceJsFiles = sourceFiles + '**/**/*.js', - outputDir = 'build'; + outputDir = 'assets'; function watchFiles() { const webpackConfig = require( './webpack.config.js' ); @@ -30,7 +30,7 @@ gulp.task( 'plugin-pot', function() { .pipe( wpPot( { domain: 'in-stock-notifier', } ) ) - .pipe( gulp.dest( 'i18n/languages/in-stock-notifier.pot' ) ); + .pipe( gulp.dest( 'languages/in-stock-notifier.pot' ) ); } ); gulp.task( 'plugin-zip-cleanup', function( done ) { @@ -76,7 +76,7 @@ gulp.task( 'watch', series( watchFiles, gulp.parallel( watchAllFiles ) ) ); gulp.task( 'build', gulp.series( [ 'production-env' ], gulp.parallel( watchFiles ) ) ); gulp.task( 'default', gulp.series( [ 'build' ] ) ); -gulp.task( 'release', gulp.series( +gulp.task( 'publish', gulp.series( [ 'production-env' ], [ 'build' ], [ 'plugin-pot' ], diff --git a/inc/classes/class-wsn-initialize.php b/inc/classes/class-wsn-initialize.php index 1d125ac..c035352 100644 --- a/inc/classes/class-wsn-initialize.php +++ b/inc/classes/class-wsn-initialize.php @@ -55,7 +55,7 @@ public function __construct() { add_filter( 'manage_edit-product_columns', array( $this, 'instockalert_add_column' ) ); // Enqueue Scripts for admin. - add_action( 'admin_init', array( $this, 'instockalert_product_setup' ) ); + add_action( 'admin_enqueue_scripts', array( $this, 'instockalert_product_setup' ) ); // This function will fire when any product stock status change. add_action( 'admin_init', array( $this, 'send_in_stock_email' ) ); @@ -67,7 +67,7 @@ public function __construct() { add_filter( 'manage_edit-product_sortable_columns', array( $this, 'wsn_sortable_tab' ) ); // Enqueue scripts of plugin. - add_action( 'init', array( $this, 'wsn_enqueue_assets' ) ); + add_action( 'wp_enqueue_scripts', array( $this, 'wsn_enqueue_assets' ) ); // Register plugin setting fields. add_action( 'init', array( $this, 'wsn_register_settings' ) ); diff --git a/instock-init.php b/instock-init.php index 4016fd6..87d3a0b 100644 --- a/instock-init.php +++ b/instock-init.php @@ -42,7 +42,7 @@ // defines define( 'WSN_PATH', plugin_dir_path( __FILE__ ) ); define( 'WSN_INCLUDE_PATH', WSN_PATH . 'inc' . DIRECTORY_SEPARATOR ); -define( 'WSN_ASSEST_PATH', plugin_dir_url( __FILE__ ) . 'build' . DIRECTORY_SEPARATOR ); +define( 'WSN_ASSEST_PATH', plugin_dir_url( __FILE__ ) . 'assets' . DIRECTORY_SEPARATOR ); define( 'WSN_CLASS_PATH', WSN_PATH . 'inc' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR ); define( 'WSN_EMAIL_TEMPLATE_PATH', WSN_PATH . 'templates' . DIRECTORY_SEPARATOR . 'email' . DIRECTORY_SEPARATOR ); diff --git a/readme.txt b/readme.txt index 075ed59..c2087b9 100644 --- a/readme.txt +++ b/readme.txt @@ -2,8 +2,9 @@ Contributors: gk.loveweb Donate link: http://emgk.github.io Tags: woocommerce plugin, woocommerce,in-stock, out-of-stock, stock management, notify user, userlist, waitlist, notify. -Requires at least: 3.3 +Requires at least: 5.3 Tested up to: 5.5.3 +Requires PHP: 7.0 Stable tag: woo-in-stock-notifier License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -50,4 +51,9 @@ When the email is sent to the sent to the user, this plugin allows you to move t * Added WooCommerce new version support = 1.0 = -* Initial release. \ No newline at end of file +* Initial release. + +== Upgrade Notice == + += 1.0.2 = +1.0.2 has brand new UI/UX, please check if compatible with your environment, [report issues here](https://github.com/emgk/woo-in-stock-notifier/issues) diff --git a/webpack.config.js b/webpack.config.js index 6cdf028..6dc88eb 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -14,7 +14,7 @@ module.exports = { }, output: { filename: 'js/[name].min.js', - path: path.resolve( __dirname, './build' ), + path: path.resolve( __dirname, './assets' ), }, module: { rules: [