diff --git a/bluehost-wordpress-plugin.php b/bluehost-wordpress-plugin.php index e3fd0d125..40e2e05ec 100644 --- a/bluehost-wordpress-plugin.php +++ b/bluehost-wordpress-plugin.php @@ -12,10 +12,10 @@ * Plugin URI: https://bluehost.com * Update URI: https://github.com/bluehost/bluehost-wordpress-plugin * Description: WordPress plugin that integrates a WordPress site with the Bluehost control panel, including performance, security, and update features. - * Version: 3.12.1 + * Version: 3.12.2 * Requires at least: 6.0 * Requires PHP: 7.1 - * Tested up to: 6.5.4 + * Tested up to: 6.5.5 * Author: Bluehost * Author URI: https://bluehost.com * Text Domain: wp-plugin-bluehost @@ -32,7 +32,7 @@ } // Define constants -define( 'BLUEHOST_PLUGIN_VERSION', '3.12.1' ); +define( 'BLUEHOST_PLUGIN_VERSION', '3.12.2' ); define( 'BLUEHOST_PLUGIN_FILE', __FILE__ ); define( 'BLUEHOST_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); define( 'BLUEHOST_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); diff --git a/composer.json b/composer.json index bdfa07b37..3f65ff9d5 100644 --- a/composer.json +++ b/composer.json @@ -82,7 +82,7 @@ "newfold-labs/wp-module-ecommerce": "^1.3.35", "newfold-labs/wp-module-facebook": "^1.0.9", "newfold-labs/wp-module-features": "^1.4.2", - "newfold-labs/wp-module-global-ctb": "^1.0.12", + "newfold-labs/wp-module-global-ctb": "^1.0.13", "newfold-labs/wp-module-help-center": "^2.0.0", "newfold-labs/wp-module-loader": "^1.0.10", "newfold-labs/wp-module-marketplace": "^2.3.0", diff --git a/composer.lock b/composer.lock index ec4f8d93a..b2cd6276e 100644 --- a/composer.lock +++ b/composer.lock @@ -652,6 +652,7 @@ }, { "name": "newfold-labs/wp-module-ecommerce", + "version": "v1.3.35", "source": { "type": "git", diff --git a/inc/Admin.php b/inc/Admin.php index 4a63d288c..0590745ba 100644 --- a/inc/Admin.php +++ b/inc/Admin.php @@ -38,6 +38,8 @@ public function __construct() { if ( isset( $_GET['page'] ) && strpos( filter_input( INPUT_GET, 'page', FILTER_UNSAFE_RAW ), 'bluehost' ) >= 0 ) { // phpcs:ignore \add_action( 'admin_footer_text', array( __CLASS__, 'add_brand_to_admin_footer' ) ); + /* Disable admin notices on App pages */ + \add_action( 'admin_init', array( __CLASS__, 'disable_admin_notices' ) ); } } @@ -278,6 +280,16 @@ public static function actions( $actions ) { ); } + /** + * Disable admin notices on App pages + * + * @return void + */ + public static function disable_admin_notices() { + remove_all_actions( 'admin_notices' ); + remove_all_actions( 'all_admin_notices' ); + } + /** * Filter WordPress Admin Footer Text "Thank you for creating with..." * diff --git a/package-lock.json b/package-lock.json index 91508a6ab..4d3c61a41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bluehost-wordpress-plugin", - "version": "3.12.1", + "version": "3.12.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "bluehost-wordpress-plugin", - "version": "3.12.1", + "version": "3.12.2", "license": "GPL-2.0-or-later", "dependencies": { "@heroicons/react": "^2.1.1", @@ -16,11 +16,11 @@ "@newfold/ui-component-library": "^1.1.0", "@reduxjs/toolkit": "^2.2.5", "@wordpress/compose": "^7.1.0", - "@wordpress/dom-ready": "^4.1.0", + "@wordpress/dom-ready": "^4.2.0", "@wordpress/element": "^6.1.0", "@wordpress/html-entities": "^4.1.0", "@wordpress/i18n": "^4.58.0", - "@wordpress/icons": "^9.49.0", + "@wordpress/icons": "^10.2.0", "classnames": "^2.5.1", "jquery": "^3.7.1", "lodash": "^4.17.21", @@ -33,14 +33,14 @@ "devDependencies": { "@tailwindcss/forms": "^0.5.7", "@testing-library/cypress": "^10.0.2", - "@wordpress/env": "^9.10.0", - "@wordpress/eslint-plugin": "^18.1.0", + "@wordpress/env": "^10.2.0", + "@wordpress/eslint-plugin": "^19.2.0", "@wordpress/scripts": "^27.4.0", "cypress": "^13.12.0", "cypress-axe": "^1.5.0", "eslint-import-resolver-alias": "^1.1.2", "eslint-plugin-import": "^2.29.1", - "tailwindcss": "^3.4.1" + "tailwindcss": "^3.4.4" }, "engines": { "node": ">=20", @@ -2590,9 +2590,9 @@ } }, "node_modules/@heroicons/react": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.1.3.tgz", - "integrity": "sha512-fEcPfo4oN345SoqdlCDdSa4ivjaKbk0jTd+oubcgNxnNgAfzysfwWfQUr+51wigiWHQQRiZNd1Ao0M5Y3M2EGg==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.1.4.tgz", + "integrity": "sha512-ju0wj0wwrUTMQ2Yceyrma7TKuI3BpSjp+qKqV81K9KGcUHdvTMdiwfRc2cwXBp3uXtKuDZkh0v03nWOQnJFv2Q==", "peerDependencies": { "react": ">= 16" } @@ -3217,6 +3217,14 @@ "swr": "2.1.5" } }, + "node_modules/@newfold-labs/wp-module-ecommerce/node_modules/@heroicons/react": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.1.3.tgz", + "integrity": "sha512-fEcPfo4oN345SoqdlCDdSa4ivjaKbk0jTd+oubcgNxnNgAfzysfwWfQUr+51wigiWHQQRiZNd1Ao0M5Y3M2EGg==", + "peerDependencies": { + "react": ">= 16" + } + }, "node_modules/@newfold-labs/wp-module-ecommerce/node_modules/@reduxjs/toolkit": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.2.3.tgz", @@ -5423,6 +5431,19 @@ "node": ">=12" } }, + "node_modules/@wordpress/components/node_modules/@wordpress/icons": { + "version": "9.49.0", + "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-9.49.0.tgz", + "integrity": "sha512-Z8F+ledkfkcKDuS1c/RkM0dEWdfv2AXs6bCgey89p0atJSscf7qYbMJR9zE5rZ5aqXyFfV0DAFKJEgayNqneNQ==", + "dependencies": { + "@babel/runtime": "^7.16.0", + "@wordpress/element": "^5.35.0", + "@wordpress/primitives": "^3.56.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@wordpress/components/node_modules/@wordpress/undo-manager": { "version": "0.18.0", "resolved": "https://registry.npmjs.org/@wordpress/undo-manager/-/undo-manager-0.18.0.tgz", @@ -5705,9 +5726,9 @@ } }, "node_modules/@wordpress/dom-ready": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-4.1.0.tgz", - "integrity": "sha512-FxlhDPGpe29rWLph3GpkQUG3sRSNRxji871S9+DviE4zt/872rKe6caum1QptsJN8rcn/hm+HIOS7qrYFjS2Xg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-4.2.0.tgz", + "integrity": "sha512-1rD9vcwVy7s+yGbe8DuDkBpjvA/PJtY2DnUgyHIedC/YonlswalBSiFWGZuTX5QyocdffBAWiUlvebyN4TNtOw==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -5755,14 +5776,14 @@ } }, "node_modules/@wordpress/element": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-6.1.0.tgz", - "integrity": "sha512-DqAGqal1i6gTfYxz95zHnckbweS43MroHqMcz/Rww60pysTCoaRG5KZ/v4/3hry1tNCem1WQguY4ZMTF0MMTBQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-6.2.0.tgz", + "integrity": "sha512-pRCchhYoH7eN0bxL4iUMBm82psqSUozlmk4B5IhQiqzYoOWn7OjvkGqejAnt81iDZUNZ8hIY2gLpRplgwwiZlQ==", "dependencies": { "@babel/runtime": "^7.16.0", "@types/react": "^18.2.79", "@types/react-dom": "^18.2.25", - "@wordpress/escape-html": "^3.1.0", + "@wordpress/escape-html": "^3.2.0", "change-case": "^4.1.2", "is-plain-object": "^5.0.0", "react": "^18.3.0", @@ -5774,9 +5795,9 @@ } }, "node_modules/@wordpress/element/node_modules/@wordpress/escape-html": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-3.1.0.tgz", - "integrity": "sha512-wcRGrGuGV4kTd5hJMXy/bdjCObqcwqFmd/HkDAUi2pfngEsv2aJhAeTfkGP5NwmY/F03Oqz2Qgd4UzTiIu2bjQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-3.2.0.tgz", + "integrity": "sha512-GFJ91lrs46zN3bgRGBHREaZ4jegwUA+2Gx+P6f11VDLhihNGKyg67uNf0lXqLoLj6iQQCBDP+15k/0k2ccr3YA==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -5786,9 +5807,9 @@ } }, "node_modules/@wordpress/env": { - "version": "9.10.0", - "resolved": "https://registry.npmjs.org/@wordpress/env/-/env-9.10.0.tgz", - "integrity": "sha512-GqUg1XdrUXI3l5NhHhEZisrccW+VPqJSU5xO1IXybI6KOvmSecidxWEqlMj26vzu2P5aLCWZcx28QkrrY3jvdg==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/env/-/env-10.2.0.tgz", + "integrity": "sha512-EToZYPGXpl42Asw3bxpX8aKmHfRUdGxKPjQ9CHZVQoTAL27Af4FyjyGnepsnDpnYdIeI8VPb2S3k2NL/1+fpIA==", "dev": true, "dependencies": { "chalk": "^4.0.0", @@ -5806,6 +5827,10 @@ }, "bin": { "wp-env": "bin/wp-env" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" } }, "node_modules/@wordpress/escape-html": { @@ -5820,16 +5845,16 @@ } }, "node_modules/@wordpress/eslint-plugin": { - "version": "18.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-18.1.0.tgz", - "integrity": "sha512-5eGpXEwaZsKbEh9040nVr4ggmrpPmltP+Ie4iGruWvCme6ZIFYw70CyWEV8S102IkqjH/BaH6d+CWg8tN7sc/g==", + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-19.2.0.tgz", + "integrity": "sha512-2mRC7WRV9qwdcMsm+VSTjcYQbLcBag5UTUXrClsQPqDZ9aeoL8QloStFCKOqXuYRYN4tYytIgnM/blvEz7OlAw==", "dev": true, "dependencies": { "@babel/eslint-parser": "^7.16.0", "@typescript-eslint/eslint-plugin": "^6.4.1", "@typescript-eslint/parser": "^6.4.1", - "@wordpress/babel-preset-default": "^7.42.0", - "@wordpress/prettier-config": "^3.15.0", + "@wordpress/babel-preset-default": "^8.2.0", + "@wordpress/prettier-config": "^4.2.0", "cosmiconfig": "^7.0.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.25.2", @@ -5844,8 +5869,8 @@ "requireindex": "^1.2.0" }, "engines": { - "node": ">=14", - "npm": ">=6.14.4" + "node": ">=18.12.0", + "npm": ">=8.19.2" }, "peerDependencies": { "@babel/core": ">=7", @@ -5862,6 +5887,62 @@ } } }, + "node_modules/@wordpress/eslint-plugin/node_modules/@wordpress/babel-preset-default": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-8.2.0.tgz", + "integrity": "sha512-bOvP+8b0zk7wjIbpaAnJSc0kkKZA6oeyJ4/GRtp+mmcrIXJWL+LNCGYQM+aUDSGO7j1QazLpTR7p5br8ygl5/g==", + "dev": true, + "dependencies": { + "@babel/core": "^7.16.0", + "@babel/plugin-transform-react-jsx": "^7.16.0", + "@babel/plugin-transform-runtime": "^7.16.0", + "@babel/preset-env": "^7.16.0", + "@babel/preset-typescript": "^7.16.0", + "@babel/runtime": "^7.16.0", + "@wordpress/browserslist-config": "^6.2.0", + "@wordpress/warning": "^3.2.0", + "browserslist": "^4.21.10", + "core-js": "^3.31.0", + "react": "^18.3.0" + }, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, + "node_modules/@wordpress/eslint-plugin/node_modules/@wordpress/browserslist-config": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-6.2.0.tgz", + "integrity": "sha512-+/qiAQmWd+d7/yvVRxXevLKurlHjknO4EcFRlBfKM3moS6GNVSkCb3n6HwFXGawaQH7aaO3pPRdzmG5SIIxrEA==", + "dev": true, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, + "node_modules/@wordpress/eslint-plugin/node_modules/@wordpress/prettier-config": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-4.2.0.tgz", + "integrity": "sha512-OvIUKpaphNdS26mQ9C9/bGzRZJnoyEzbJdtCmWr45fHAcfmkYbyNdyBERGjcne0F9BbMWP3yIqfB7eHZjQ1hnw==", + "dev": true, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + }, + "peerDependencies": { + "prettier": ">=3" + } + }, + "node_modules/@wordpress/eslint-plugin/node_modules/@wordpress/warning": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-3.2.0.tgz", + "integrity": "sha512-i+EYX506tE45+lhOW4qAwXm/5/PmkAdvKhNt+dTxJDif+ATUqp4QaFFRl9yFIt/v+ksAapQ0bnPkKNSDsECGtA==", + "dev": true, + "engines": { + "node": ">=18.12.0", + "npm": ">=8.19.2" + } + }, "node_modules/@wordpress/hooks": { "version": "3.58.0", "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.58.0.tgz", @@ -5905,34 +5986,31 @@ } }, "node_modules/@wordpress/icons": { - "version": "9.49.0", - "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-9.49.0.tgz", - "integrity": "sha512-Z8F+ledkfkcKDuS1c/RkM0dEWdfv2AXs6bCgey89p0atJSscf7qYbMJR9zE5rZ5aqXyFfV0DAFKJEgayNqneNQ==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-10.2.0.tgz", + "integrity": "sha512-6N39YvCUHgmqfewByKY1biBE+w/r/o1O9hQgW/zd4v1RVFQNOTxfmhqSmbbTePLzrdKcbB1setM+lJtwvwvrnA==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/element": "^5.35.0", - "@wordpress/primitives": "^3.56.0" + "@wordpress/element": "^6.2.0", + "@wordpress/primitives": "^4.2.0" }, "engines": { - "node": ">=12" + "node": ">=18.12.0", + "npm": ">=8.19.2" } }, - "node_modules/@wordpress/icons/node_modules/@wordpress/element": { - "version": "5.35.0", - "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-5.35.0.tgz", - "integrity": "sha512-puswpGcIdS+0A2g28uHriMkZqqRCmzFczue5Tk99VNtzBdehyk7Ae+DZ4xw5yT6GqYai8NTqv6MRwCB78uh5Mw==", + "node_modules/@wordpress/icons/node_modules/@wordpress/primitives": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/primitives/-/primitives-4.2.0.tgz", + "integrity": "sha512-UofDIMe3pQ4UvubCAjm4/Y+o/niAiHFRjhavvxBOZ5iCFyjG/1knbJcWa8+0qvjIA5YTBzZxfN6PD4Je1SwtFw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@types/react": "^18.2.79", - "@types/react-dom": "^18.2.25", - "@wordpress/escape-html": "^2.58.0", - "change-case": "^4.1.2", - "is-plain-object": "^5.0.0", - "react": "^18.3.0", - "react-dom": "^18.3.0" + "@wordpress/element": "^6.2.0", + "clsx": "^2.1.1" }, "engines": { - "node": ">=12" + "node": ">=18.12.0", + "npm": ">=8.19.2" } }, "node_modules/@wordpress/is-shallow-equal": { @@ -6263,6 +6341,49 @@ "react-dom": "^18.0.0" } }, + "node_modules/@wordpress/scripts/node_modules/@wordpress/eslint-plugin": { + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-18.1.0.tgz", + "integrity": "sha512-5eGpXEwaZsKbEh9040nVr4ggmrpPmltP+Ie4iGruWvCme6ZIFYw70CyWEV8S102IkqjH/BaH6d+CWg8tN7sc/g==", + "dev": true, + "dependencies": { + "@babel/eslint-parser": "^7.16.0", + "@typescript-eslint/eslint-plugin": "^6.4.1", + "@typescript-eslint/parser": "^6.4.1", + "@wordpress/babel-preset-default": "^7.42.0", + "@wordpress/prettier-config": "^3.15.0", + "cosmiconfig": "^7.0.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-jest": "^27.2.3", + "eslint-plugin-jsdoc": "^46.4.6", + "eslint-plugin-jsx-a11y": "^6.5.1", + "eslint-plugin-playwright": "^0.15.3", + "eslint-plugin-prettier": "^5.0.0", + "eslint-plugin-react": "^7.27.0", + "eslint-plugin-react-hooks": "^4.3.0", + "globals": "^13.12.0", + "requireindex": "^1.2.0" + }, + "engines": { + "node": ">=14", + "npm": ">=6.14.4" + }, + "peerDependencies": { + "@babel/core": ">=7", + "eslint": ">=8", + "prettier": ">=3", + "typescript": ">=4" + }, + "peerDependenciesMeta": { + "prettier": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, "node_modules/@wordpress/stylelint-config": { "version": "21.40.0", "resolved": "https://registry.npmjs.org/@wordpress/stylelint-config/-/stylelint-config-21.40.0.tgz", @@ -20870,9 +20991,9 @@ } }, "node_modules/tailwindcss": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.3.tgz", - "integrity": "sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A==", + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.4.tgz", + "integrity": "sha512-ZoyXOdJjISB7/BcLTR6SEsLgKtDStYyYZVLsUtWChO4Ps20CBad7lfJKVDiejocV4ME1hLmyY0WJE3hSDcmQ2A==", "dev": true, "dependencies": { "@alloc/quick-lru": "^5.2.0", diff --git a/package.json b/package.json index 0cc6e545e..783884cdf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bluehost-wordpress-plugin", - "version": "3.12.1", + "version": "3.12.2", "description": "WordPress plugin that integrates your WordPress site with the Bluehost control panel, including performance, security, and update features.", "author": { "name": "Bluehost", @@ -39,11 +39,11 @@ "@newfold/ui-component-library": "^1.1.0", "@reduxjs/toolkit": "^2.2.5", "@wordpress/compose": "^7.1.0", - "@wordpress/dom-ready": "^4.1.0", + "@wordpress/dom-ready": "^4.2.0", "@wordpress/element": "^6.1.0", "@wordpress/html-entities": "^4.1.0", "@wordpress/i18n": "^4.58.0", - "@wordpress/icons": "^9.49.0", + "@wordpress/icons": "^10.2.0", "classnames": "^2.5.1", "jquery": "^3.7.1", "lodash": "^4.17.21", @@ -56,14 +56,14 @@ "devDependencies": { "@tailwindcss/forms": "^0.5.7", "@testing-library/cypress": "^10.0.2", - "@wordpress/env": "^9.10.0", - "@wordpress/eslint-plugin": "^18.1.0", + "@wordpress/env": "^10.2.0", + "@wordpress/eslint-plugin": "^19.2.0", "@wordpress/scripts": "^27.4.0", "cypress": "^13.12.0", "cypress-axe": "^1.5.0", "eslint-import-resolver-alias": "^1.1.2", "eslint-plugin-import": "^2.29.1", - "tailwindcss": "^3.4.1" + "tailwindcss": "^3.4.4" }, "scripts": { "build": "NODE_ENV=production wp-scripts build", diff --git a/src/app/pages/ecommerce/page.js b/src/app/pages/ecommerce/page.js index d9122eaa2..6033ad282 100644 --- a/src/app/pages/ecommerce/page.js +++ b/src/app/pages/ecommerce/page.js @@ -7,6 +7,7 @@ import '@newfold-labs/wp-module-ecommerce/bluehost.css'; import AppStore from 'App/data/store'; import { bluehostSettingsApiFetch } from 'App/util/helpers'; import { useNotification } from 'App/components/notifications'; +import { comingSoonAdminbarToggle } from '../../util/helpers'; const ECommerce = () => { const { store, setStore } = useContext( AppStore ); @@ -33,6 +34,7 @@ const ECommerce = () => { ...store, comingSoon: ! store.comingSoon, } ); + comingSoonAdminbarToggle( ! store.comingSoon ); } ), }; diff --git a/src/app/pages/home/welcomeSection.js b/src/app/pages/home/welcomeSection.js index ad0e1ef74..32d1bc4bc 100644 --- a/src/app/pages/home/welcomeSection.js +++ b/src/app/pages/home/welcomeSection.js @@ -1,8 +1,10 @@ import { useContext } from '@wordpress/element'; +import { useUpdateEffect } from 'react-use'; import { OnboardingScreen } from '@newfold-labs/wp-module-ecommerce'; import AppStore from 'App/data/store'; import { bluehostSettingsApiFetch } from 'App/util/helpers'; import { useNotification } from 'App/components/notifications'; +import { comingSoonAdminbarToggle } from '../../util/helpers'; const WelcomeSection = ( {} ) => { const { store, setStore } = useContext( AppStore ); @@ -16,6 +18,10 @@ const WelcomeSection = ( {} ) => { () => setStore( { ...store, comingSoon: ! store.comingSoon } ) ); + useUpdateEffect( () => { + comingSoonAdminbarToggle( store.comingSoon ); + }, [ store.comingSoon ] ); + return (