From 14187a194570372b557bf27e2be3c73e61eb678a Mon Sep 17 00:00:00 2001 From: Abhijit Bhatnagar Date: Thu, 20 Apr 2023 14:24:22 +0530 Subject: [PATCH 01/15] Bump Onboarding Version to 1.4.0 --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index d46a51de8..eba805dc0 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,7 @@ "newfold-labs/wp-module-loader": "^1.0.10", "newfold-labs/wp-module-marketplace": "^1.5.0", "newfold-labs/wp-module-notifications": "^1.1.2", - "newfold-labs/wp-module-onboarding": "1.3.0", + "newfold-labs/wp-module-onboarding": "1.4.0", "newfold-labs/wp-module-secure-passwords": "^1.1", "newfold-labs/wp-module-sso": "^1.0.3", "wp-forge/collection": "^1.0.2", diff --git a/composer.lock b/composer.lock index 15e1f1321..bd1d800de 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": "15db393879dcc84112f27c147695299b", + "content-hash": "badfc93d4b03c9fdc1c56117d7f4c6eb", "packages": [ { "name": "doctrine/inflector", @@ -544,16 +544,16 @@ }, { "name": "newfold-labs/wp-module-onboarding", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-onboarding.git", - "reference": "053e660daf5de5c508b856228d498117d1c95f12" + "reference": "215c3ef7ccddabd22991ae149980c203be0f486e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-onboarding/zipball/053e660daf5de5c508b856228d498117d1c95f12", - "reference": "053e660daf5de5c508b856228d498117d1c95f12", + "url": "https://api.github.com/repos/newfold-labs/wp-module-onboarding/zipball/215c3ef7ccddabd22991ae149980c203be0f486e", + "reference": "215c3ef7ccddabd22991ae149980c203be0f486e", "shasum": "" }, "require": { @@ -593,10 +593,10 @@ ], "description": "Next-generation WordPress Onboarding for WordPress sites at Newfold Digital.", "support": { - "source": "https://github.com/newfold-labs/wp-module-onboarding/tree/1.3.0", + "source": "https://github.com/newfold-labs/wp-module-onboarding/tree/1.4.0", "issues": "https://github.com/newfold-labs/wp-module-onboarding/issues" }, - "time": "2023-04-06T08:04:58+00:00" + "time": "2023-04-20T08:12:36+00:00" }, { "name": "newfold-labs/wp-module-secure-passwords", From a452c2e8ae93d8e5082662576a0eb80a9d109fa1 Mon Sep 17 00:00:00 2001 From: Abhijit Bhatnagar Date: Thu, 20 Apr 2023 17:32:39 +0530 Subject: [PATCH 02/15] fixing test when mm_brand does not exist in DB --- .../wp-module-onboarding/branding.cy.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/cypress/integration/z-newfold-labs/wp-module-onboarding/branding.cy.js b/tests/cypress/integration/z-newfold-labs/wp-module-onboarding/branding.cy.js index f38213e5c..371a2f60a 100644 --- a/tests/cypress/integration/z-newfold-labs/wp-module-onboarding/branding.cy.js +++ b/tests/cypress/integration/z-newfold-labs/wp-module-onboarding/branding.cy.js @@ -5,14 +5,16 @@ describe( 'Branding', function () { cy.visit( 'wp-admin/index.php?page=nfd-onboarding&flow=ecommerce' ); } ); - it( 'Has Newfold CSS when mm_brand does not exist.', () => { + // since we are setting brand from plugin container, it will not be set to "newfold" + // by default even if mm_brand option is deleted from the database + it( 'Has Bluehost CSS when mm_brand does not exist.', () => { cy.exec( 'npx wp-env run cli wp option delete mm_brand' ); cy.reload(); - cy.get( 'body' ).should( 'have.class', 'nfd-brand-newfold' ); + cy.get( 'body' ).should( 'have.class', 'nfd-brand-bluehost' ); cy.get( '.is-bg-primary' ) - .should( 'have.css', 'background-color', 'rgb(221, 82, 40)' ) - .should( 'have.css', 'color', 'rgb(242, 242, 242)' ); - cy.get( '.nfd-step-card-subheading' ).should( 'contain', 'undefined' ); + .should( 'have.css', 'background-color', 'rgb(53, 117, 211)' ) + .should( 'have.css', 'color', 'rgb(255, 255, 255)' ); + cy.get( '.nfd-step-card-subheading' ).should( 'contain', 'Bluehost' ); } ); it( 'Has Newfold CSS when mm_brand has an empty value', () => { From 8aed99fc962826dd678ec1ea86807e4d95b108f3 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 20 Apr 2023 17:34:10 -0400 Subject: [PATCH 03/15] remove old ctb files and add new module --- bootstrap.php | 1 - composer.json | 1 + composer.lock | 52 +++++++++++- inc/CTB/CTBApi.php | 105 ------------------------ inc/CTB/bootstrap.php | 45 ----------- inc/CTB/ctb.css | 113 -------------------------- inc/CTB/js/a11y-dialog.min.js | 2 - inc/CTB/js/ctb.js | 145 ---------------------------------- 8 files changed, 52 insertions(+), 412 deletions(-) delete mode 100644 inc/CTB/CTBApi.php delete mode 100644 inc/CTB/bootstrap.php delete mode 100644 inc/CTB/ctb.css delete mode 100644 inc/CTB/js/a11y-dialog.min.js delete mode 100644 inc/CTB/js/ctb.js diff --git a/bootstrap.php b/bootstrap.php index 4b998d238..b5c5fbfa8 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -74,7 +74,6 @@ function () { require __DIR__ . '/inc/cli-init.php'; require __DIR__ . '/inc/jetpack.php'; require __DIR__ . '/inc/menu.php'; -require __DIR__ . '/inc/CTB/bootstrap.php'; require __DIR__ . '/inc/partners.php'; require __DIR__ . '/inc/performance.php'; require __DIR__ . '/inc/track-last-login.php'; diff --git a/composer.json b/composer.json index d46a51de8..03e116467 100644 --- a/composer.json +++ b/composer.json @@ -38,6 +38,7 @@ "doctrine/inflector": "1.2.0 as 1.3.1", "newfold-labs/wp-module-business-reviews": "^1.1", "newfold-labs/wp-module-coming-soon": "^1.1.3", + "newfold-labs/wp-module-ctb": "^0.6.0", "newfold-labs/wp-module-customer-bluehost": "^1.5.3", "newfold-labs/wp-module-data": "^2.3.0", "newfold-labs/wp-module-ecommerce": "0.8.2", diff --git a/composer.lock b/composer.lock index 15e1f1321..14642ab82 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": "15db393879dcc84112f27c147695299b", + "content-hash": "3b8ff47df9f5ad4c407c4900f78c88f5", "packages": [ { "name": "doctrine/inflector", @@ -249,6 +249,56 @@ }, "time": "2023-04-19T19:31:25+00:00" }, + { + "name": "newfold-labs/wp-module-ctb", + "version": "0.6.0", + "source": { + "type": "git", + "url": "https://github.com/newfold-labs/wp-module-ctb.git", + "reference": "8407ec43c0328e51f7e6090269334b7d935a24ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/newfold-labs/wp-module-ctb/zipball/8407ec43c0328e51f7e6090269334b7d935a24ef", + "reference": "8407ec43c0328e51f7e6090269334b7d935a24ef", + "shasum": "" + }, + "require-dev": { + "newfold-labs/wp-php-standards": "^1.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "NewfoldLabs\\WP\\Module\\CTB\\": "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": "Evan Mullins", + "homepage": "https://evanmullins.com" + } + ], + "description": "Newfold module for 'Click to Buy' functionality in brand plugins", + "support": { + "source": "https://github.com/newfold-labs/wp-module-ctb/tree/0.6.0", + "issues": "https://github.com/newfold-labs/wp-module-ctb/issues" + }, + "time": "2023-04-20T17:06:28+00:00" + }, { "name": "newfold-labs/wp-module-customer-bluehost", "version": "1.5.3", diff --git a/inc/CTB/CTBApi.php b/inc/CTB/CTBApi.php deleted file mode 100644 index 811eb121e..000000000 --- a/inc/CTB/CTBApi.php +++ /dev/null @@ -1,105 +0,0 @@ -[a-zA-Z0-9-]+)', - array( - 'methods' => \WP_REST_Server::READABLE, - 'permission_callback' => function () { - return current_user_can( 'manage_options' ); - }, - 'callback' => function ( \WP_REST_Request $request ) { - - // Check for customer_id first. If it's not available, then CTB will not work. - $customer_data = CustomerBluehost::collect(); - if ( empty( $customer_data ) || ! isset( $customer_data['customer_id'] ) ) { - return new WP_Error( 500, 'Customer ID is required for CTB' ); - } - - $response = wp_remote_get( - NFD_HIIVE_URL . '/sites/v1/ctb/' . $request->get_param( 'id' ) . '', - array( - 'headers' => array( - 'Content-Type' => 'application/json', - 'Accept' => 'application/json', - 'Authorization' => 'Bearer ' . HiiveConnection::get_auth_token(), - ), - 'timeout' => 20, - ) - ); - - if ( $response instanceof WP_Error ) { - return $response; - } - - return new \WP_REST_Response( json_decode( wp_remote_retrieve_body( $response ) ), wp_remote_retrieve_response_code( $response ) ); - }, - ) - ); - - // Add route for purchasing a CTB - register_rest_route( - 'bluehost/v1', - '/ctb/(?P[a-zA-Z0-9-]+)', - array( - 'methods' => \WP_REST_Server::CREATABLE, - 'permission_callback' => function () { - return current_user_can( 'manage_options' ); - }, - 'callback' => function ( \WP_REST_Request $request ) { - - $ctb_id = $request->get_param( 'id' ); - $customer_data = CustomerBluehost::collect(); - if ( empty( $customer_data ) || ! isset( $customer_data['customer_id'] ) ) { - return new WP_Error( 500, 'Customer ID is required to purchase CTB' ); - } - $payload = array( - 'ctb_id' => $ctb_id, - 'customer_id' => $customer_data['customer_id'], - 'site_id' => SiteMeta::get_id(), - ); - - $response = wp_remote_post( - NFD_HIIVE_URL . '/sites/v1/ctb/' . $ctb_id . '/purchase', - array( - 'headers' => array( - 'Content-Type' => 'application/json', - 'Accept' => 'application/json', - 'Authorization' => 'Bearer ' . HiiveConnection::get_auth_token(), - ), - 'body' => wp_json_encode( $payload ), - 'timeout' => 20, - ) - ); - - if ( $response instanceof WP_Error ) { - return $response; - } - - return new \WP_REST_Response( json_decode( wp_remote_retrieve_body( $response ) ), wp_remote_retrieve_response_code( $response ) ); - }, - ) - ); - } - -} diff --git a/inc/CTB/bootstrap.php b/inc/CTB/bootstrap.php deleted file mode 100644 index cd9c66c0a..000000000 --- a/inc/CTB/bootstrap.php +++ /dev/null @@ -1,45 +0,0 @@ - esc_url_raw( get_home_url() . '/index.php?rest_route=/' ), - 'restApiNonce' => wp_create_nonce( 'wp_rest' ), - ) - ); - } -); - -add_action( - 'admin_enqueue_scripts', - function() { - wp_enqueue_style( - 'bh-ctb', - plugins_url( 'inc/CTB/ctb.css', BLUEHOST_PLUGIN_FILE ), - array(), - BLUEHOST_PLUGIN_VERSION - ); - } -); - -add_action( - 'admin_footer', - function () { - echo ""; - } -); diff --git a/inc/CTB/ctb.css b/inc/CTB/ctb.css deleted file mode 100644 index bfda1d7ef..000000000 --- a/inc/CTB/ctb.css +++ /dev/null @@ -1,113 +0,0 @@ -body.noscroll { - overflow-y: hidden; -} - -#nfd-ctb-container { - position: absolute; -} - -#nfd-ctb-container, -.ctb-modal-overlay { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; -} - -#nfd-ctb-container { - z-index: 100000; - display: flex; - justify-content: center; - align-items: center; -} - -#nfd-ctb-container[aria-hidden='true'] { - display: none; -} - -.ctb-modal-overlay { - background-color: rgba(43, 46, 56, 0.9); -} - -.ctb-modal-content { - margin: auto; - padding: 1.25rem; - z-index: 2; - position: relative; - background-color: white; - /* z-index: 20001; */ - min-width: 500px; - max-width: 75%; - min-height: 250px; - background: white; - color: black; - display: flex; - justify-content: center; - align-items: center; -} - -.ctb-modal img { - max-width: 100%; -} - - -.ctb-modal button { - cursor: pointer; -} - -.ctb-loader { - width: 5rem; - height: 5rem; - border-radius: 50%; - background: #3575d3; - background: linear-gradient(to right, #3575d3 5%, rgba(0, 0, 0, 0) 32%); - position: relative; - will-change: transform; - -webkit-animation: ctbloader .9s infinite linear; - animation: ctbloader .9s infinite linear; - transform: translateZ(0); -} - -.ctb-loader:before { - width: 50%; - height: 50%; - background: #3575d3; - border-radius: 100% 0 0 0; - position: absolute; - top: 0; - left: 0; - content: ""; -} - -.ctb-loader:after { - background: #fff; - width: 88%; - height: 88%; - border-radius: 50%; - content: ""; - margin: auto; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; -} - -@keyframes ctbloader { - 0% { - transform: rotate(0deg); - } - - 100% { - transform: rotate(360deg); - } -} - -@media screen and (max-width: 768px) { - .ctb-modal-content { - padding: 1.1rem; - min-width: 80vw; - max-width: 80vw; - } -} \ No newline at end of file diff --git a/inc/CTB/js/a11y-dialog.min.js b/inc/CTB/js/a11y-dialog.min.js deleted file mode 100644 index 9c774eb53..000000000 --- a/inc/CTB/js/a11y-dialog.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! a11y-dialog 7.4.0 — © Kitty Giraudel */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).A11yDialog=e()}(this,(function(){"use strict";var t=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])'];function e(t){this._show=this.show.bind(this),this._hide=this.hide.bind(this),this._maintainFocus=this._maintainFocus.bind(this),this._bindKeypress=this._bindKeypress.bind(this),this.$el=t,this.shown=!1,this._id=this.$el.getAttribute("data-a11y-dialog")||this.$el.id,this._previouslyFocused=null,this._listeners={},this.create()}function i(t,e){return i=(e||document).querySelectorAll(t),Array.prototype.slice.call(i);var i}function n(t){(t.querySelector("[autofocus]")||t).focus()}function s(){i("[data-a11y-dialog]").forEach((function(t){new e(t)}))}return e.prototype.create=function(){return this.$el.setAttribute("aria-hidden",!0),this.$el.setAttribute("aria-modal",!0),this.$el.setAttribute("tabindex",-1),this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog"),this._openers=i('[data-a11y-dialog-show="'+this._id+'"]'),this._openers.forEach(function(t){t.addEventListener("click",this._show)}.bind(this)),this._closers=i("[data-a11y-dialog-hide]",this.$el).concat(i('[data-a11y-dialog-hide="'+this._id+'"]')),this._closers.forEach(function(t){t.addEventListener("click",this._hide)}.bind(this)),this._fire("create"),this},e.prototype.show=function(t){return this.shown||(this._previouslyFocused=document.activeElement,this.$el.removeAttribute("aria-hidden"),this.shown=!0,n(this.$el),document.body.addEventListener("focus",this._maintainFocus,!0),document.addEventListener("keydown",this._bindKeypress),this._fire("show",t)),this},e.prototype.hide=function(t){return this.shown?(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),this._previouslyFocused&&this._previouslyFocused.focus&&this._previouslyFocused.focus(),document.body.removeEventListener("focus",this._maintainFocus,!0),document.removeEventListener("keydown",this._bindKeypress),this._fire("hide",t),this):this},e.prototype.destroy=function(){return this.hide(),this._openers.forEach(function(t){t.removeEventListener("click",this._show)}.bind(this)),this._closers.forEach(function(t){t.removeEventListener("click",this._hide)}.bind(this)),this._fire("destroy"),this._listeners={},this},e.prototype.on=function(t,e){return void 0===this._listeners[t]&&(this._listeners[t]=[]),this._listeners[t].push(e),this},e.prototype.off=function(t,e){var i=(this._listeners[t]||[]).indexOf(e);return i>-1&&this._listeners[t].splice(i,1),this},e.prototype._fire=function(t,e){var i=this._listeners[t]||[],n=new CustomEvent(t,{detail:e});this.$el.dispatchEvent(n),i.forEach(function(t){t(this.$el,e)}.bind(this))},e.prototype._bindKeypress=function(e){this.$el.contains(document.activeElement)&&(this.shown&&27===e.which&&"alertdialog"!==this.$el.getAttribute("role")&&(e.preventDefault(),this.hide(e)),this.shown&&9===e.which&&function(e,n){var s=function(e){return i(t.join(","),e).filter((function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}))}(e),o=s.indexOf(document.activeElement);n.shiftKey&&0===o?(s[s.length-1].focus(),n.preventDefault()):n.shiftKey||o!==s.length-1||(s[0].focus(),n.preventDefault())}(this.$el,e))},e.prototype._maintainFocus=function(t){!this.shown||t.target.closest('[aria-modal="true"]')||t.target.closest("[data-a11y-dialog-ignore-focus-trap]")||n(this.$el)},"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",s):window.requestAnimationFrame?window.requestAnimationFrame(s):window.setTimeout(s,16)),e})); diff --git a/inc/CTB/js/ctb.js b/inc/CTB/js/ctb.js deleted file mode 100644 index 30d18f03a..000000000 --- a/inc/CTB/js/ctb.js +++ /dev/null @@ -1,145 +0,0 @@ -{ - const purchase = (e) => { - let modalWindow = e.target.closest('.ctb-modal-content'); - let ctbId = e.target.getAttribute('data-ctb-id'); - e.target.closest('.ctb-actions').innerHTML = '
'; - window.fetch( - `${ window.bhctb.restApiUrl }bluehost/v1/ctb/${ ctbId }`, - { - credentials: 'same-origin', - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'X-WP-Nonce': window.bhctb.restApiNonce, - }, - } - ) - .then( response => { - purchaseStatus = (response.status === 200); - return response.json(); - }).then( data => { - if (data.content) { - modalWindow.innerHTML = data.content; - if (purchaseStatus){ - dismissNotice(ctbId); - } - } else { - displayError(modalWindow, "purchase"); - } - }); - } - - const loadCtb = (e) => { - let modal = openModal(e); - let modalWindow = modal.querySelector('.ctb-modal-content') - window.fetch( - `${ window.bhctb.restApiUrl }bluehost/v1/ctb/${ e.target.getAttribute('data-ctb-id') }`, - { - credentials: 'same-origin', - headers: { - 'Content-Type': 'application/json', - 'X-WP-Nonce': window.bhctb.restApiNonce, - }, - } - ) - .then( response => { - return response.json(); - }).then( data => { - if (data.content) { - modalWindow.innerHTML = data.content; - } else { - displayError(modalWindow, 'load'); - //remove ctb attributes from button so the user can click the link - removeCtbAttrs(e); - } - }); - } - - const removeCtbAttrs = (e) => { - let ctbButton = e.target; - ctbButton.removeAttribute('data-action'); - ctbButton.removeAttribute('data-ctb-id'); - } - - const openModal = (e) => { - let modalContent = ` -
-
-
-
-
-
- `; - let ctbContainer = document.getElementById('nfd-ctb-container'); - if (ctbContainer) { - ctbContainer.innerHTML = modalContent - } else { - ctbContainer = document.createElement('div'); - ctbContainer.setAttribute('id', 'nfd-ctb-container'); - ctbContainer.innerHTML = modalContent; - ctbContainer.target.insertAdjacentElement('afterend', nfd-ctb-container); - } - - ctbmodal = new A11yDialog(ctbContainer); - ctbmodal.show(); - document.querySelector('body').classList.add('noscroll'); - - purchaseStatus = false; - - return ctbContainer; - } - - const closeModal = (e) => { - ctbmodal.destroy(); - document.querySelector('body').classList.remove('noscroll'); - } - - const displayError = (modalWindow, error) => { - let message = (error === 'purchase') ? 'complete the transaction' : 'load the product information'; - modalWindow.innerHTML = `
-

Sorry, we are unable to ${message} at this time.

- -
`; - } - - const dismissNotice = (ctbId) => { - const ctbTrigger = document.querySelector('[data-ctb-id="' + ctbId + '"]') - const notice = ctbTrigger.closest('.bluehost-notice'); - if (notice) { - notice.parentNode.removeChild(notice); - window.fetch( - `${ window.bhctb.restApiUrl }newfold-notifications/v1/notifications/${ notice.dataset.id }`, - { - credentials: 'same-origin', - method: 'DELETE', - headers: { - 'Content-Type': 'application/json', - 'X-WP-Nonce': window.bhctb.restApiNonce, - }, - } - ); - } - } - - window.addEventListener( - 'load', - () => { - document.getElementById('wpwrap').addEventListener('click', function(event) { - if (event.target.dataset.action === 'load-nfd-ctb') { - if ( window.nfdConnected ) { // has token and customer id - event.preventDefault(); - loadCtb(event); - } else { - // do nothing, fallback to href - } - } - if (event.target.dataset.action === 'purchase-ctb') { - purchase(event); - } - if (event.target.hasAttribute('data-a11y-dialog-destroy')) { - closeModal(event.target); - } - }); - } - ); -} From 67dff7a5c81b5b5fb235d07e930b75d498537307 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 20 Apr 2023 17:52:42 -0400 Subject: [PATCH 04/15] add customer and site info to container --- bluehost-wordpress-plugin.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bluehost-wordpress-plugin.php b/bluehost-wordpress-plugin.php index eff9b6aca..3088ee96f 100644 --- a/bluehost-wordpress-plugin.php +++ b/bluehost-wordpress-plugin.php @@ -18,6 +18,8 @@ use NewfoldLabs\WP\ModuleLoader\Container; use NewfoldLabs\WP\ModuleLoader\Plugin; +use NewfoldLabs\WP\Module\CustomerBluehost\CustomerBluehost; +use Bluehost\SiteMeta; use function NewfoldLabs\WP\ModuleLoader\container as setContainer; @@ -122,6 +124,8 @@ function () { 'file' => BLUEHOST_PLUGIN_FILE, 'brand' => get_option( 'mm_brand', 'bluehost' ), 'install_date' => get_option( 'bh_plugin_install_date' ), + 'customer' => CustomerBluehost::collect(), + 'site_id' => SiteMeta::get_id(), ) ); } From 50fafb1a901d613455131ce68daf394d8d78cacb Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 20 Apr 2023 17:54:15 -0400 Subject: [PATCH 05/15] fix global js values since they were attached to removed bh-ctb script set existing admin data do load on common script add new localized data to be used by ctb module --- inc/admin/class-assets.php | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/inc/admin/class-assets.php b/inc/admin/class-assets.php index c3062a71d..2b6d0c7eb 100644 --- a/inc/admin/class-assets.php +++ b/inc/admin/class-assets.php @@ -72,16 +72,20 @@ public function register_assets( $hook ) { * for ctb script which loads on all admin */ protected function prepareAdminData() { - $token = get_option( 'nfd_data_token' ); - $customerData = CustomerBluehost::collect(); - $hasToken = ! empty( $token ); - $hasCustomerId = ! empty( $customerData ) && ! empty( $customerData['customer_id'] ); - $showCTBs = $hasToken && $hasCustomerId; - - \wp_add_inline_script( 'bh-ctb', 'window.bluehostWpAdminUrl="' . \admin_url() . '";', 'before' ); - \wp_add_inline_script( 'bh-ctb', 'window.nfBrandPlatform="' . \get_option( 'mm_brand' ) . '";', 'before' ); - \wp_add_inline_script( 'bh-ctb', 'window.nfdRestRoot="' . \get_home_url() . '/index.php?rest_route=";', 'before' ); - \wp_add_inline_script( 'bh-ctb', $showCTBs ? 'window.nfdConnected=true;' : 'window.nfdConnected=false;', 'before' ); + + \wp_add_inline_script( 'common', 'window.bluehostWpAdminUrl="' . \admin_url() . '";', 'before' ); + \wp_add_inline_script( 'common', 'window.nfBrandPlatform="' . \get_option( 'mm_brand' ) . '";', 'before' ); + \wp_add_inline_script( 'common', 'window.nfdRestRoot="' . \get_home_url() . '/index.php?rest_route=";', 'before' ); + + + wp_localize_script( + 'common', + 'nfdplugin', + array( + 'restApiUrl' => esc_url_raw( \get_home_url() . '/index.php?rest_route=' ), + 'restApiNonce' => \wp_create_nonce( 'wp_rest' ), + ) + ); } /** From cd623519846169f234421766a99e02052ee30803 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 20 Apr 2023 17:54:42 -0400 Subject: [PATCH 06/15] load marketplace supportsCTB value from module global var --- src/app/pages/marketplace/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/pages/marketplace/index.js b/src/app/pages/marketplace/index.js index e1b356dc4..d51a49986 100644 --- a/src/app/pages/marketplace/index.js +++ b/src/app/pages/marketplace/index.js @@ -51,7 +51,7 @@ function MarketplacePage() { 'resturl': window.nfdRestRoot, 'eventendpoint': '/newfold-data/v1/events/', 'perPage': 12, - 'supportsCTB': window.nfdConnected, + 'supportsCTB': window.nfdctb.supportsCTB, } return ( From 771def2e2e10bac0927930ffb6813fcb2d4b0fb1 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 20 Apr 2023 18:00:41 -0400 Subject: [PATCH 07/15] lint fix --- inc/admin/class-assets.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/inc/admin/class-assets.php b/inc/admin/class-assets.php index 2b6d0c7eb..4632dee26 100644 --- a/inc/admin/class-assets.php +++ b/inc/admin/class-assets.php @@ -76,14 +76,13 @@ protected function prepareAdminData() { \wp_add_inline_script( 'common', 'window.bluehostWpAdminUrl="' . \admin_url() . '";', 'before' ); \wp_add_inline_script( 'common', 'window.nfBrandPlatform="' . \get_option( 'mm_brand' ) . '";', 'before' ); \wp_add_inline_script( 'common', 'window.nfdRestRoot="' . \get_home_url() . '/index.php?rest_route=";', 'before' ); - - + wp_localize_script( 'common', 'nfdplugin', array( - 'restApiUrl' => esc_url_raw( \get_home_url() . '/index.php?rest_route=' ), - 'restApiNonce' => \wp_create_nonce( 'wp_rest' ), + 'restApiUrl' => esc_url_raw( \get_home_url() . '/index.php?rest_route=' ), + 'restApiNonce' => \wp_create_nonce( 'wp_rest' ), ) ); } From ad7f9a8ba124ccb4ac01e15f7a0356eab19d6b11 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Fri, 21 Apr 2023 10:02:39 -0400 Subject: [PATCH 08/15] new module without adding customer to container --- bluehost-wordpress-plugin.php | 4 ++-- composer.json | 2 +- composer.lock | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bluehost-wordpress-plugin.php b/bluehost-wordpress-plugin.php index 3088ee96f..7ac1fe1a1 100644 --- a/bluehost-wordpress-plugin.php +++ b/bluehost-wordpress-plugin.php @@ -18,7 +18,7 @@ use NewfoldLabs\WP\ModuleLoader\Container; use NewfoldLabs\WP\ModuleLoader\Plugin; -use NewfoldLabs\WP\Module\CustomerBluehost\CustomerBluehost; +// use NewfoldLabs\WP\Module\CustomerBluehost\CustomerBluehost; use Bluehost\SiteMeta; use function NewfoldLabs\WP\ModuleLoader\container as setContainer; @@ -124,7 +124,7 @@ function () { 'file' => BLUEHOST_PLUGIN_FILE, 'brand' => get_option( 'mm_brand', 'bluehost' ), 'install_date' => get_option( 'bh_plugin_install_date' ), - 'customer' => CustomerBluehost::collect(), + // 'customer' => CustomerBluehost::collect(), 'site_id' => SiteMeta::get_id(), ) ); diff --git a/composer.json b/composer.json index 03e116467..60679c8ab 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "doctrine/inflector": "1.2.0 as 1.3.1", "newfold-labs/wp-module-business-reviews": "^1.1", "newfold-labs/wp-module-coming-soon": "^1.1.3", - "newfold-labs/wp-module-ctb": "^0.6.0", + "newfold-labs/wp-module-ctb": "^0.7.0", "newfold-labs/wp-module-customer-bluehost": "^1.5.3", "newfold-labs/wp-module-data": "^2.3.0", "newfold-labs/wp-module-ecommerce": "0.8.2", diff --git a/composer.lock b/composer.lock index 14642ab82..e3c61d78b 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": "3b8ff47df9f5ad4c407c4900f78c88f5", + "content-hash": "d0bcf903dad30bffa599265b1c9c3ea3", "packages": [ { "name": "doctrine/inflector", @@ -251,16 +251,16 @@ }, { "name": "newfold-labs/wp-module-ctb", - "version": "0.6.0", + "version": "0.7.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-ctb.git", - "reference": "8407ec43c0328e51f7e6090269334b7d935a24ef" + "reference": "03504e16f1bf54a72417e8813fc6258c47fa9915" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-ctb/zipball/8407ec43c0328e51f7e6090269334b7d935a24ef", - "reference": "8407ec43c0328e51f7e6090269334b7d935a24ef", + "url": "https://api.github.com/repos/newfold-labs/wp-module-ctb/zipball/03504e16f1bf54a72417e8813fc6258c47fa9915", + "reference": "03504e16f1bf54a72417e8813fc6258c47fa9915", "shasum": "" }, "require-dev": { @@ -294,10 +294,10 @@ ], "description": "Newfold module for 'Click to Buy' functionality in brand plugins", "support": { - "source": "https://github.com/newfold-labs/wp-module-ctb/tree/0.6.0", + "source": "https://github.com/newfold-labs/wp-module-ctb/tree/0.7.0", "issues": "https://github.com/newfold-labs/wp-module-ctb/issues" }, - "time": "2023-04-20T17:06:28+00:00" + "time": "2023-04-21T13:47:36+00:00" }, { "name": "newfold-labs/wp-module-customer-bluehost", From 08905cd3d164ec844ac5bd2bfdff2bc943ff9ef6 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Fri, 21 Apr 2023 10:25:14 -0400 Subject: [PATCH 09/15] update ctb test to use new endpoints and supportsCTB flag --- tests/cypress/integration/ctb.cy.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/cypress/integration/ctb.cy.js b/tests/cypress/integration/ctb.cy.js index 5cfccfcd7..3fa580bc9 100644 --- a/tests/cypress/integration/ctb.cy.js +++ b/tests/cypress/integration/ctb.cy.js @@ -6,14 +6,14 @@ describe('Click to buy', function () { cy.intercept({ method: 'GET', - url: /bluehost(\/|%2F)v1(\/|%2F)ctb/, + url: /newfold-ctb(\/|%2F)v1(\/|%2F)ctb/, },{ fixture: 'ctbGET' }).as('ctbGET'); cy.intercept({ method: 'POST', - url: /bluehost(\/|%2F)v1(\/|%2F)ctb/, + url: /newfold-ctb(\/|%2F)v1(\/|%2F)ctb/, }, { fixture: 'ctbPOST' }).as('ctbPOST'); @@ -21,7 +21,7 @@ describe('Click to buy', function () { cy.visit('/wp-admin/admin.php?page=bluehost#/marketplace/plugins/yoast-seo-premium', { onBeforeLoad(contentWindow) { // set nfdConnected to true, so the ctb click will pass to the endpoint and be intercepted - Object.defineProperty(contentWindow, 'nfdConnected', { + Object.defineProperty(contentWindow, 'nfdctb.supportsCTB', { configurable: false, writable: false, value: true From fd80a7a79bc6c35baa36c4052a019b4336a97c7b Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Fri, 21 Apr 2023 11:46:57 -0400 Subject: [PATCH 10/15] set test object properly --- tests/cypress/integration/ctb.cy.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/cypress/integration/ctb.cy.js b/tests/cypress/integration/ctb.cy.js index 3fa580bc9..f74bb5b10 100644 --- a/tests/cypress/integration/ctb.cy.js +++ b/tests/cypress/integration/ctb.cy.js @@ -20,11 +20,14 @@ describe('Click to buy', function () { cy.visit('/wp-admin/admin.php?page=bluehost#/marketplace/plugins/yoast-seo-premium', { onBeforeLoad(contentWindow) { - // set nfdConnected to true, so the ctb click will pass to the endpoint and be intercepted - Object.defineProperty(contentWindow, 'nfdctb.supportsCTB', { + let nfdctb = { + supportsCTB: true + }; + // set supportsCTB to true, so the ctb click will pass to the endpoint and be intercepted + Object.defineProperty(contentWindow, 'nfdctb', { configurable: false, writable: false, - value: true + value: nfdctb }); } }); From a8c740d30ddb44c7e74fbfcfe6dde6075826271d Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Fri, 21 Apr 2023 16:25:21 -0400 Subject: [PATCH 11/15] include initial (fianlly) release of ctb module and cleanup method ns --- composer.json | 2 +- composer.lock | 14 +++++++------- inc/admin/class-assets.php | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 60679c8ab..ecf122e70 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "doctrine/inflector": "1.2.0 as 1.3.1", "newfold-labs/wp-module-business-reviews": "^1.1", "newfold-labs/wp-module-coming-soon": "^1.1.3", - "newfold-labs/wp-module-ctb": "^0.7.0", + "newfold-labs/wp-module-ctb": "^1.0.0", "newfold-labs/wp-module-customer-bluehost": "^1.5.3", "newfold-labs/wp-module-data": "^2.3.0", "newfold-labs/wp-module-ecommerce": "0.8.2", diff --git a/composer.lock b/composer.lock index e3c61d78b..43360c12e 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": "d0bcf903dad30bffa599265b1c9c3ea3", + "content-hash": "5bd27c80fb0cb22f1f833df757c3b1ee", "packages": [ { "name": "doctrine/inflector", @@ -251,16 +251,16 @@ }, { "name": "newfold-labs/wp-module-ctb", - "version": "0.7.0", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-ctb.git", - "reference": "03504e16f1bf54a72417e8813fc6258c47fa9915" + "reference": "949e785b815d55eda15ad0d06dc7a25d83803a93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-ctb/zipball/03504e16f1bf54a72417e8813fc6258c47fa9915", - "reference": "03504e16f1bf54a72417e8813fc6258c47fa9915", + "url": "https://api.github.com/repos/newfold-labs/wp-module-ctb/zipball/949e785b815d55eda15ad0d06dc7a25d83803a93", + "reference": "949e785b815d55eda15ad0d06dc7a25d83803a93", "shasum": "" }, "require-dev": { @@ -294,10 +294,10 @@ ], "description": "Newfold module for 'Click to Buy' functionality in brand plugins", "support": { - "source": "https://github.com/newfold-labs/wp-module-ctb/tree/0.7.0", + "source": "https://github.com/newfold-labs/wp-module-ctb/tree/1.0.0", "issues": "https://github.com/newfold-labs/wp-module-ctb/issues" }, - "time": "2023-04-21T13:47:36+00:00" + "time": "2023-04-21T20:08:32+00:00" }, { "name": "newfold-labs/wp-module-customer-bluehost", diff --git a/inc/admin/class-assets.php b/inc/admin/class-assets.php index 4632dee26..e16dcba2d 100644 --- a/inc/admin/class-assets.php +++ b/inc/admin/class-assets.php @@ -77,11 +77,11 @@ protected function prepareAdminData() { \wp_add_inline_script( 'common', 'window.nfBrandPlatform="' . \get_option( 'mm_brand' ) . '";', 'before' ); \wp_add_inline_script( 'common', 'window.nfdRestRoot="' . \get_home_url() . '/index.php?rest_route=";', 'before' ); - wp_localize_script( + \wp_localize_script( 'common', 'nfdplugin', array( - 'restApiUrl' => esc_url_raw( \get_home_url() . '/index.php?rest_route=' ), + 'restApiUrl' => \esc_url_raw( \get_home_url() . '/index.php?rest_route=' ), 'restApiNonce' => \wp_create_nonce( 'wp_rest' ), ) ); @@ -102,7 +102,7 @@ protected function prepareData() { 'pages' => Bluehost_Admin_App_Page::get_top_level_pages(), 'noticesPathsDenyList' => Bluehost_Admin_App_Page::$noticesPathsDenyList, // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase 'accountId' => mojo_site_bin2hex(), - 'nonce' => wp_create_nonce( mojo_site_bin2hex() ), + 'nonce' => \wp_create_nonce( mojo_site_bin2hex() ), 'customer' => $customerData, ), 'env' => array( From 3d619e6ebee2b18841d373208d1b1be06ce2db70 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Mon, 24 Apr 2023 17:24:23 -0400 Subject: [PATCH 12/15] use a placeholder script handle to place global js values --- inc/admin/class-assets.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/inc/admin/class-assets.php b/inc/admin/class-assets.php index e16dcba2d..5e769d1ed 100644 --- a/inc/admin/class-assets.php +++ b/inc/admin/class-assets.php @@ -72,13 +72,18 @@ public function register_assets( $hook ) { * for ctb script which loads on all admin */ protected function prepareAdminData() { + // register placeholder script handle with no source + wp_register_script( 'newfold-plugin', null, null, BLUEHOST_PLUGIN_VERSION, true ); + wp_enqueue_script( 'newfold-plugin' ); - \wp_add_inline_script( 'common', 'window.bluehostWpAdminUrl="' . \admin_url() . '";', 'before' ); - \wp_add_inline_script( 'common', 'window.nfBrandPlatform="' . \get_option( 'mm_brand' ) . '";', 'before' ); - \wp_add_inline_script( 'common', 'window.nfdRestRoot="' . \get_home_url() . '/index.php?rest_route=";', 'before' ); + // add inline scripts to the handle with global js values + \wp_add_inline_script( 'newfold-plugin', 'window.bluehostWpAdminUrl="' . \admin_url() . '";', 'before' ); + \wp_add_inline_script( 'newfold-plugin', 'window.nfBrandPlatform="' . \get_option( 'mm_brand' ) . '";', 'before' ); + \wp_add_inline_script( 'newfold-plugin', 'window.nfdRestRoot="' . \get_home_url() . '/index.php?rest_route=";', 'before' ); + // place values in nfdplugin object \wp_localize_script( - 'common', + 'newfold-plugin', 'nfdplugin', array( 'restApiUrl' => \esc_url_raw( \get_home_url() . '/index.php?rest_route=' ), From a24df2101de3a318920d58d5e67a3a74ae417e78 Mon Sep 17 00:00:00 2001 From: Allen Benny Date: Tue, 25 Apr 2023 14:06:21 +0530 Subject: [PATCH 13/15] Bump onboarding to 1.4.1 --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index eba805dc0..38eb2f533 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,7 @@ "newfold-labs/wp-module-loader": "^1.0.10", "newfold-labs/wp-module-marketplace": "^1.5.0", "newfold-labs/wp-module-notifications": "^1.1.2", - "newfold-labs/wp-module-onboarding": "1.4.0", + "newfold-labs/wp-module-onboarding": "1.4.1", "newfold-labs/wp-module-secure-passwords": "^1.1", "newfold-labs/wp-module-sso": "^1.0.3", "wp-forge/collection": "^1.0.2", diff --git a/composer.lock b/composer.lock index bd1d800de..4375bb2c4 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": "badfc93d4b03c9fdc1c56117d7f4c6eb", + "content-hash": "a5c6b9884f832466dbbdd707b7581859", "packages": [ { "name": "doctrine/inflector", @@ -544,16 +544,16 @@ }, { "name": "newfold-labs/wp-module-onboarding", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-onboarding.git", - "reference": "215c3ef7ccddabd22991ae149980c203be0f486e" + "reference": "8f356fa28a87e05cd2d6b24b4365ef31c2119449" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-onboarding/zipball/215c3ef7ccddabd22991ae149980c203be0f486e", - "reference": "215c3ef7ccddabd22991ae149980c203be0f486e", + "url": "https://api.github.com/repos/newfold-labs/wp-module-onboarding/zipball/8f356fa28a87e05cd2d6b24b4365ef31c2119449", + "reference": "8f356fa28a87e05cd2d6b24b4365ef31c2119449", "shasum": "" }, "require": { @@ -593,10 +593,10 @@ ], "description": "Next-generation WordPress Onboarding for WordPress sites at Newfold Digital.", "support": { - "source": "https://github.com/newfold-labs/wp-module-onboarding/tree/1.4.0", + "source": "https://github.com/newfold-labs/wp-module-onboarding/tree/1.4.1", "issues": "https://github.com/newfold-labs/wp-module-onboarding/issues" }, - "time": "2023-04-20T08:12:36+00:00" + "time": "2023-04-25T08:06:41+00:00" }, { "name": "newfold-labs/wp-module-secure-passwords", From ecc0f29fe446276ee64db12033ed9e728e638e98 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Tue, 25 Apr 2023 16:11:43 -0400 Subject: [PATCH 14/15] version bump --- bluehost-wordpress-plugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bluehost-wordpress-plugin.php b/bluehost-wordpress-plugin.php index eff9b6aca..eb85ab404 100644 --- a/bluehost-wordpress-plugin.php +++ b/bluehost-wordpress-plugin.php @@ -2,7 +2,7 @@ /** * Plugin Name: The Bluehost Plugin * Description: This plugin integrates your WordPress site with the Bluehost control panel, including performance, security, and update features. - * Version: 2.13.2 + * Version: 2.13.3 * Tested up to: 6.2 * Requires at least: 5.9 * Requires PHP: 7.0 @@ -33,7 +33,7 @@ } // Define constants -define( 'BLUEHOST_PLUGIN_VERSION', '2.13.2' ); +define( 'BLUEHOST_PLUGIN_VERSION', '2.13.3' ); define( 'BLUEHOST_PLUGIN_FILE', __FILE__ ); define( 'BLUEHOST_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); define( 'BLUEHOST_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); From af3435094f5092d5826fe5168a58d79a0014a464 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Wed, 26 Apr 2023 09:49:49 -0400 Subject: [PATCH 15/15] marketplace module update for ctb --- composer.json | 2 +- composer.lock | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 976e5b742..50904bbed 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "newfold-labs/wp-module-data": "^2.3.0", "newfold-labs/wp-module-ecommerce": "0.8.2", "newfold-labs/wp-module-loader": "^1.0.10", - "newfold-labs/wp-module-marketplace": "^1.5.0", + "newfold-labs/wp-module-marketplace": "^1.5.1", "newfold-labs/wp-module-notifications": "^1.1.2", "newfold-labs/wp-module-onboarding": "1.4.1", "newfold-labs/wp-module-secure-passwords": "^1.1", diff --git a/composer.lock b/composer.lock index 18c2db295..8999c0a9f 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": "cfe3d0cc586b84833692b635308c15fd", + "content-hash": "a902ceffef4f0efaca2bf3672a8c9f7c", "packages": [ { "name": "doctrine/inflector", @@ -492,16 +492,16 @@ }, { "name": "newfold-labs/wp-module-marketplace", - "version": "1.5.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-marketplace.git", - "reference": "98b21eb5fc9ac1c78eb8bc61e674b45a682739f3" + "reference": "9d2e43d375db62f88f0963a19674f0b4f50116bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-marketplace/zipball/98b21eb5fc9ac1c78eb8bc61e674b45a682739f3", - "reference": "98b21eb5fc9ac1c78eb8bc61e674b45a682739f3", + "url": "https://api.github.com/repos/newfold-labs/wp-module-marketplace/zipball/9d2e43d375db62f88f0963a19674f0b4f50116bd", + "reference": "9d2e43d375db62f88f0963a19674f0b4f50116bd", "shasum": "" }, "require": { @@ -542,10 +542,10 @@ ], "description": "A module for rendering product data and interacting with the Hiive marketplace API.", "support": { - "source": "https://github.com/newfold-labs/wp-module-marketplace/tree/1.5.0", + "source": "https://github.com/newfold-labs/wp-module-marketplace/tree/1.5.1", "issues": "https://github.com/newfold-labs/wp-module-marketplace/issues" }, - "time": "2023-03-13T15:56:29+00:00" + "time": "2023-04-26T13:31:44+00:00" }, { "name": "newfold-labs/wp-module-notifications",