diff --git a/bluehost-wordpress-plugin.php b/bluehost-wordpress-plugin.php index d31477a47..d31f3f67a 100644 --- a/bluehost-wordpress-plugin.php +++ b/bluehost-wordpress-plugin.php @@ -12,7 +12,7 @@ * 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.14.5 + * Version: 3.14.6 * Requires at least: 6.4 * Requires PHP: 7.3 * Tested up to: 6.6.1 @@ -32,7 +32,7 @@ } // Define constants -define( 'BLUEHOST_PLUGIN_VERSION', '3.14.5' ); +define( 'BLUEHOST_PLUGIN_VERSION', '3.14.6' ); 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 8483519fb..b4412e210 100644 --- a/composer.json +++ b/composer.json @@ -85,7 +85,8 @@ "newfold-labs/wp-module-help-center": "^2.0.1", "newfold-labs/wp-module-loader": "^1.0.10", "newfold-labs/wp-module-marketplace": "^2.4.0", - "newfold-labs/wp-module-migration": "^1.0.10", + "newfold-labs/wp-module-migration": "^1.0.11", + "newfold-labs/wp-module-my-products": "^1.0.1", "newfold-labs/wp-module-notifications": "^1.5.0", "newfold-labs/wp-module-onboarding": "^2.3.11", "newfold-labs/wp-module-patterns": "^2.3.1", diff --git a/composer.lock b/composer.lock index 2cc52bad4..608030b5d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1b72beb21460316ee5e4596cba353ea3", + "content-hash": "001b5cba0bb7e33dd7f6801888bb5605", "packages": [ { "name": "doctrine/inflector", @@ -663,16 +663,16 @@ }, { "name": "newfold-labs/wp-module-ecommerce", - "version": "v1.3.41", + "version": "v1.3.40", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-ecommerce.git", - "reference": "4e4d787d6a033c2f2f3672ceaae4ae17ff41968d" + "reference": "56b70f018aaa7d49fe4eed6cc83b831d3cfb5999" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-ecommerce/zipball/4e4d787d6a033c2f2f3672ceaae4ae17ff41968d", - "reference": "4e4d787d6a033c2f2f3672ceaae4ae17ff41968d", + "url": "https://api.github.com/repos/newfold-labs/wp-module-ecommerce/zipball/56b70f018aaa7d49fe4eed6cc83b831d3cfb5999", + "reference": "56b70f018aaa7d49fe4eed6cc83b831d3cfb5999", "shasum": "" }, "require": { @@ -715,10 +715,10 @@ ], "description": "Brand Agnostic eCommerce Experience", "support": { - "source": "https://github.com/newfold-labs/wp-module-ecommerce/tree/v1.3.41", + "source": "https://github.com/newfold-labs/wp-module-ecommerce/tree/v1.3.40", "issues": "https://github.com/newfold-labs/wp-module-ecommerce/issues" }, - "time": "2024-08-21T09:22:19+00:00" + "time": "2024-08-14T12:15:48+00:00" }, { "name": "newfold-labs/wp-module-facebook", @@ -1102,16 +1102,16 @@ }, { "name": "newfold-labs/wp-module-migration", - "version": "v1.0.10", + "version": "v1.0.11", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-migration.git", - "reference": "853d4fa02f83889ac3045c23a4e4744c85c49022" + "reference": "d84570b93abf5baade814bbb8d71871adff10e89" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-migration/zipball/853d4fa02f83889ac3045c23a4e4744c85c49022", - "reference": "853d4fa02f83889ac3045c23a4e4744c85c49022", + "url": "https://api.github.com/repos/newfold-labs/wp-module-migration/zipball/d84570b93abf5baade814bbb8d71871adff10e89", + "reference": "d84570b93abf5baade814bbb8d71871adff10e89", "shasum": "" }, "require": { @@ -1149,10 +1149,69 @@ ], "description": "Initiates the migration process", "support": { - "source": "https://github.com/newfold-labs/wp-module-migration/tree/v1.0.10", + "source": "https://github.com/newfold-labs/wp-module-migration/tree/v1.0.11", "issues": "https://github.com/newfold-labs/wp-module-migration/issues" }, - "time": "2024-08-20T13:34:22+00:00" + "time": "2024-08-21T14:04:06+00:00" + }, + { + "name": "newfold-labs/wp-module-my-products", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/newfold-labs/wp-module-my-products.git", + "reference": "685999ab517a31f8f14e8ff64186aff02fd1c75b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/newfold-labs/wp-module-my-products/zipball/685999ab517a31f8f14e8ff64186aff02fd1c75b", + "reference": "685999ab517a31f8f14e8ff64186aff02fd1c75b", + "shasum": "" + }, + "require": { + "newfold-labs/wp-module-context": "^1.0", + "newfold-labs/wp-module-data": "^2.6.1", + "newfold-labs/wp-module-features": "^1.3.0" + }, + "require-dev": { + "newfold-labs/wp-php-standards": "^1.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "NewfoldLabs\\WP\\Module\\MyProducts\\": "includes" + }, + "files": [ + "bootstrap.php" + ] + }, + "scripts": { + "fix": [ + "vendor/bin/phpcbf --standard=phpcs.xml ." + ], + "lint": [ + "vendor/bin/phpcs --standard=phpcs.xml -s ." + ] + }, + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Vara Prasad Maruboina", + "email": "varaprasad.maruboina@newfold.com" + }, + { + "name": "Girish Lokapure", + "email": "girish.lokapure@newfold.com" + } + ], + "description": "A module for rendering user-specific product data utilizing the Hiive Users API, which integrates with the Fulfilment Gateway API.", + "support": { + "source": "https://github.com/newfold-labs/wp-module-my-products/tree/1.0.1", + "issues": "https://github.com/newfold-labs/wp-module-my-products/issues" + }, + "time": "2024-08-22T03:21:25+00:00" }, { "name": "newfold-labs/wp-module-notifications", @@ -4306,5 +4365,5 @@ "platform-overrides": { "php": "7.3.0" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/package-lock.json b/package-lock.json index df2536d25..03510ed24 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bluehost-wordpress-plugin", - "version": "3.14.5", + "version": "3.14.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "bluehost-wordpress-plugin", - "version": "3.14.5", + "version": "3.14.6", "license": "GPL-2.0-or-later", "dependencies": { "@heroicons/react": "^2.1.5", @@ -14,13 +14,13 @@ "@newfold-labs/wp-module-facebook": "1.0.7", "@newfold-labs/wp-module-runtime": "^1.0.10", "@newfold/ui-component-library": "^1.1.0", - "@reduxjs/toolkit": "^2.2.6", + "@reduxjs/toolkit": "^2.2.7", "@wordpress/compose": "^7.5.0", "@wordpress/dom-ready": "^4.5.0", "@wordpress/element": "^6.3.0", - "@wordpress/html-entities": "^4.4.0", + "@wordpress/html-entities": "^4.6.0", "@wordpress/i18n": "^5.4.0", - "@wordpress/icons": "^10.4.0", + "@wordpress/icons": "^10.5.0", "classnames": "^2.5.1", "jquery": "^3.7.1", "lodash": "^4.17.21", @@ -34,9 +34,9 @@ "@tailwindcss/forms": "^0.5.7", "@testing-library/cypress": "^10.0.2", "@wordpress/env": "^10.5.0", - "@wordpress/eslint-plugin": "^20.1.0", + "@wordpress/eslint-plugin": "^20.2.0", "@wordpress/scripts": "^27.9.0", - "cypress": "^13.13.2", + "cypress": "^13.13.3", "cypress-axe": "^1.5.0", "eslint-import-resolver-alias": "^1.1.2", "eslint-plugin-import": "^2.29.1", @@ -3622,9 +3622,9 @@ } }, "node_modules/@reduxjs/toolkit": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.2.6.tgz", - "integrity": "sha512-kH0r495c5z1t0g796eDQAkYbEQ3a1OLYN9o8jQQVZyKyw367pfRGS+qZLkHYvFHiUUdafpoSlQ2QYObIApjPWA==", + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.2.7.tgz", + "integrity": "sha512-faI3cZbSdFb8yv9dhDTmGwclW0vk0z5o1cia+kf7gCbaCwHI5e+7tP57mJUv22pNcNbeA62GSrPpfrUfdXcQ6g==", "dependencies": { "immer": "^10.0.3", "redux": "^5.0.1", @@ -5917,16 +5917,16 @@ } }, "node_modules/@wordpress/eslint-plugin": { - "version": "20.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-20.1.0.tgz", - "integrity": "sha512-2FVQsdvG92qiKKnXhR0JO4RVyjrdRVY5vS6C6OZjp4M+O/kC/k5sx/BsjOX09qyUGletXJyQRmy11uoCE9lmAA==", + "version": "20.2.0", + "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-20.2.0.tgz", + "integrity": "sha512-lC8sUkzf4x3ByQHs3xF7X0XxS3SPEYzXho9+NeIgB5Cg0s/PlyWuPQI+4oHVgZI3hzPH76G6ewRtIt27gQRcdw==", "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": "^8.4.0", - "@wordpress/prettier-config": "^4.4.0", + "@wordpress/babel-preset-default": "^8.5.0", + "@wordpress/prettier-config": "^4.5.0", "cosmiconfig": "^7.0.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.25.2", @@ -5960,9 +5960,9 @@ } }, "node_modules/@wordpress/eslint-plugin/node_modules/@wordpress/babel-preset-default": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-8.4.0.tgz", - "integrity": "sha512-BIbHlZxXGG6gEDrTUJ3s7wU2mAPbHFCkc7QkeTD+7GMIixEzEPr7IBbrpHkcwLIRWqEvc9LB69YPrWklUKJZmg==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-8.5.0.tgz", + "integrity": "sha512-ra9UWhidrAIoYTuqIIMFs+5LawUis/qDhiB2c3mc9HJUXXQDOvdhww5f9H9SjWqOo1oB9jSuVh4pXtBpcR1E6A==", "dev": true, "dependencies": { "@babel/core": "^7.16.0", @@ -5971,8 +5971,8 @@ "@babel/preset-env": "^7.16.0", "@babel/preset-typescript": "^7.16.0", "@babel/runtime": "^7.16.0", - "@wordpress/browserslist-config": "^6.4.0", - "@wordpress/warning": "^3.4.0", + "@wordpress/browserslist-config": "^6.5.0", + "@wordpress/warning": "^3.5.0", "browserslist": "^4.21.10", "core-js": "^3.31.0", "react": "^18.3.0" @@ -5983,9 +5983,9 @@ } }, "node_modules/@wordpress/eslint-plugin/node_modules/@wordpress/browserslist-config": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-6.4.0.tgz", - "integrity": "sha512-6Uvh++K+UCOSSlE589uHtxVWa7vJmcFjDYHT7/VsdrHkwpCRwJd0UAUrmTBqiekGYo3NQzZW/ikODxR+lkORjw==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-6.5.0.tgz", + "integrity": "sha512-B5cYN5INRknBjzbNH2qJOq6x66qXS2UoLk5Ebyew1JkW9xzvX1O+eQumjFv65fAN6RNPtomHs8c7BNoD3wAebQ==", "dev": true, "engines": { "node": ">=18.12.0", @@ -5993,9 +5993,9 @@ } }, "node_modules/@wordpress/eslint-plugin/node_modules/@wordpress/prettier-config": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-4.4.0.tgz", - "integrity": "sha512-etguLCGd8r0solW9pkUeBHGuqrsCGL+d2JzCB3APhDo3mYD+TK2PUg3EfXKOvJzHsQwHg73h0eW9/C5DU+ll+Q==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-4.5.0.tgz", + "integrity": "sha512-HxpR4128yfJJs1idQaBJfBffa6P2JXKN7mvx+D/G2UukjjWlXHaCXLO8wuBLnXwXSg4pOq5vfDM/p5TawZd7Zg==", "dev": true, "engines": { "node": ">=18.12.0", @@ -6006,9 +6006,9 @@ } }, "node_modules/@wordpress/eslint-plugin/node_modules/@wordpress/warning": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-3.4.0.tgz", - "integrity": "sha512-0LbBvyRLZVulwVcseH+WryDlnP//CFBwAq15+XzzoZc3s0ANlGsLPTlYamZ7eoyosGQZVKqG/yzP3DAlESj89w==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-3.5.0.tgz", + "integrity": "sha512-cYM2Vqf2EokJJoWHD5Ry15OUmdsKtDgR8/qxE0sWHUAdSQeoTuJZnqhgYI898cZGxHaZWX2xJCxQa7Qtwl8lqw==", "dev": true, "engines": { "node": ">=18.12.0", @@ -6027,9 +6027,9 @@ } }, "node_modules/@wordpress/html-entities": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@wordpress/html-entities/-/html-entities-4.4.0.tgz", - "integrity": "sha512-EXOo+eBYeKKuBFgRleQYfK3fdXy5gzFdHtxbPPDunsETYkdapgX4pr/epDLmi9Uk3fcdFMwFre2o2s6LkLke4A==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@wordpress/html-entities/-/html-entities-4.6.0.tgz", + "integrity": "sha512-ypTlGwDKw7jpmu9rneErkkq9dFHXzju8SGdEWkVAeqhRS9Ifri9DvmrovASB2c5IPY+Ijwh4YlVkx1yNBRHr5w==", "dependencies": { "@babel/runtime": "^7.16.0" }, @@ -6071,13 +6071,13 @@ } }, "node_modules/@wordpress/icons": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-10.4.0.tgz", - "integrity": "sha512-1odn+v7Fr5n3+ZpdXb37zy/yr/4LQLvYcT0pPtQ6fnuKGoelnU5f2FEAWwFgJ+Nvt5GjzKAFV3XGk1Qr81z3Mw==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-10.5.0.tgz", + "integrity": "sha512-BZwKBRKoTef9uW73T+FwK6d4JlcvgdVAaz3LB5dCluXg5PLV5ufMdumAaMxKWq/Ffl92/ddt8CKIdHjxfAZF4A==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/element": "^6.4.0", - "@wordpress/primitives": "^4.4.0" + "@wordpress/element": "^6.5.0", + "@wordpress/primitives": "^4.5.0" }, "engines": { "node": ">=18.12.0", @@ -6085,17 +6085,20 @@ } }, "node_modules/@wordpress/icons/node_modules/@wordpress/primitives": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@wordpress/primitives/-/primitives-4.4.0.tgz", - "integrity": "sha512-QmIrB0EgrmrFrCEngvrE/4mN7CGQMeJNkbvYinNNpqv53RDYI6cYCoMRDvNNXlqb+Ja3rOzkef0/VZdvtv2PMw==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@wordpress/primitives/-/primitives-4.5.0.tgz", + "integrity": "sha512-1TYCpCAr2BmYJESlD8v325GgYXSgUbrFtebwgvpMN/28CEwmPN+ORRECV41nPX4yVJ2k0kYzYxzQUGp/78xWsw==", "dependencies": { "@babel/runtime": "^7.16.0", - "@wordpress/element": "^6.4.0", + "@wordpress/element": "^6.5.0", "clsx": "^2.1.1" }, "engines": { "node": ">=18.12.0", "npm": ">=8.19.2" + }, + "peerDependencies": { + "react": "^18.0.0" } }, "node_modules/@wordpress/is-shallow-equal": { @@ -9187,9 +9190,9 @@ } }, "node_modules/cypress": { - "version": "13.13.2", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.13.2.tgz", - "integrity": "sha512-PvJQU33933NvS1StfzEb8/mu2kMy4dABwCF+yd5Bi7Qly1HOVf+Bufrygee/tlmty/6j5lX+KIi8j9Q3JUMbhA==", + "version": "13.13.3", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.13.3.tgz", + "integrity": "sha512-hUxPrdbJXhUOTzuML+y9Av7CKoYznbD83pt8g3klgpioEha0emfx4WNIuVRx0C76r0xV2MIwAW9WYiXfVJYFQw==", "dev": true, "hasInstallScript": true, "dependencies": { diff --git a/package.json b/package.json index 80ea179a3..4d3fce87f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bluehost-wordpress-plugin", - "version": "3.14.5", + "version": "3.14.6", "description": "WordPress plugin that integrates your WordPress site with the Bluehost control panel, including performance, security, and update features.", "author": { "name": "Bluehost", @@ -37,13 +37,13 @@ "@newfold-labs/wp-module-facebook": "1.0.7", "@newfold-labs/wp-module-runtime": "^1.0.10", "@newfold/ui-component-library": "^1.1.0", - "@reduxjs/toolkit": "^2.2.6", + "@reduxjs/toolkit": "^2.2.7", "@wordpress/compose": "^7.5.0", "@wordpress/dom-ready": "^4.5.0", "@wordpress/element": "^6.3.0", - "@wordpress/html-entities": "^4.4.0", + "@wordpress/html-entities": "^4.6.0", "@wordpress/i18n": "^5.4.0", - "@wordpress/icons": "^10.4.0", + "@wordpress/icons": "^10.5.0", "classnames": "^2.5.1", "jquery": "^3.7.1", "lodash": "^4.17.21", @@ -57,9 +57,9 @@ "@tailwindcss/forms": "^0.5.7", "@testing-library/cypress": "^10.0.2", "@wordpress/env": "^10.5.0", - "@wordpress/eslint-plugin": "^20.1.0", + "@wordpress/eslint-plugin": "^20.2.0", "@wordpress/scripts": "^27.9.0", - "cypress": "^13.13.2", + "cypress": "^13.13.3", "cypress-axe": "^1.5.0", "eslint-import-resolver-alias": "^1.1.2", "eslint-plugin-import": "^2.29.1", diff --git a/src/app/pages/home/index.js b/src/app/pages/home/index.js index bd7f2254c..7598c1bc9 100644 --- a/src/app/pages/home/index.js +++ b/src/app/pages/home/index.js @@ -1,8 +1,14 @@ import { Container, Page } from '@newfold/ui-component-library'; +import { NewfoldRuntime } from '@newfold-labs/wp-module-runtime'; import WebinarsBanner from 'App/components/webinars-banner'; import AccountCard from './accountCard'; import HelpCard from './helpCard'; import WelcomeSection from './welcomeSection'; +import MyProductSection from './myProductsSection'; + +const abTestShowMyProducts = NewfoldRuntime.hasCapability( + 'abTestShowMyProducts' +); const Home = () => { return ( @@ -17,6 +23,7 @@ const Home = () => { + { abTestShowMyProducts && } ); }; diff --git a/src/app/pages/home/myProductsSection.js b/src/app/pages/home/myProductsSection.js new file mode 100644 index 000000000..39be23d3e --- /dev/null +++ b/src/app/pages/home/myProductsSection.js @@ -0,0 +1,53 @@ +import apiFetch from '@wordpress/api-fetch'; +import { useState, useEffect } from '@wordpress/element'; +import { NewfoldRuntime } from '@newfold-labs/wp-module-runtime'; +import { isJarvis } from '../../util/helpers'; +import { default as NewfoldMyProducts } from '@modules/wp-module-my-products/components/myProducts'; + +// constants to pass to module +const moduleConstants = { + text: { + error: __( + 'Oops, there was an error loading products, please try again later.', + 'bluehost-wordpress-plugin' + ), + noProducts: __( + 'Sorry, no products. Please, try again later.', + 'bluehost-wordpress-plugin' + ), + jarvisText: __( + 'Please login to your account manager to see products.', + 'bluehost-wordpress-plugin' + ), + title: __( 'My Products', 'bluehost-wordpress-plugin' ), + subTitle: __( + 'A list of products associated with your Bluehost hosting package. For more information, check out the ', + 'bluehost-wordpress-plugin' + ), + renewalText: __( + 'Bluehost Account Manager', + 'bluehost-wordpress-plugin' + ), + renewalCenterUrl: 'https://www.bluehost.com/my-account/renewal-center', + }, +}; + +// methods to pass to module +const moduleMethods = { + apiFetch, + useState, + useEffect, + NewfoldRuntime, + isJarvis, +}; + +const MyProductsSection = () => { + return ( + + ); +}; + +export default MyProductsSection;