Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

Commit

Permalink
Merge branch 'develop' into bump/onboarding
Browse files Browse the repository at this point in the history
  • Loading branch information
officiallygod authored Sep 17, 2024
2 parents bce6816 + 53a67d8 commit 52f2133
Show file tree
Hide file tree
Showing 8 changed files with 133 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"core": "WordPress/WordPress#tags/6.6.1",
"core": "WordPress/WordPress#tags/6.6.2",
"config": {
"WP_DEBUG": true,
"WP_DEBUG_LOG": true,
Expand Down
6 changes: 3 additions & 3 deletions bluehost-wordpress-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.14.8
* Version: 3.14.9
* Requires at least: 6.4
* Requires PHP: 7.3
* Tested up to: 6.6.1
* Tested up to: 6.6.2
* Author: Bluehost
* Author URI: https://bluehost.com
* Text Domain: wp-plugin-bluehost
Expand All @@ -32,7 +32,7 @@
}

// Define constants
define( 'BLUEHOST_PLUGIN_VERSION', '3.14.8' );
define( 'BLUEHOST_PLUGIN_VERSION', '3.14.9' );
define( 'BLUEHOST_PLUGIN_FILE', __FILE__ );
define( 'BLUEHOST_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'BLUEHOST_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,15 @@
"newfold-labs/wp-module-context": "^1.0.1",
"newfold-labs/wp-module-data": "^2.6.3",
"newfold-labs/wp-module-deactivation": "^1.2.3",
"newfold-labs/wp-module-ecommerce": "^1.3.42",
"newfold-labs/wp-module-ecommerce": "^1.3.43",
"newfold-labs/wp-module-facebook": "^1.0.9",
"newfold-labs/wp-module-features": "^1.4.2",
"newfold-labs/wp-module-global-ctb": "^1.0.13",
"newfold-labs/wp-module-help-center": "^2.1.0",
"newfold-labs/wp-module-loader": "^1.0.10",
"newfold-labs/wp-module-marketplace": "^2.4.0",
"newfold-labs/wp-module-migration": "^1.0.11",
"newfold-labs/wp-module-my-products": "^1.0.5",
"newfold-labs/wp-module-notifications": "^1.5.0",
"newfold-labs/wp-module-onboarding": "^2.4.1",
"newfold-labs/wp-module-patterns": "^2.4.1",
Expand Down
59 changes: 59 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bluehost-wordpress-plugin",
"version": "3.14.8",
"version": "3.14.9",
"description": "WordPress plugin that integrates your WordPress site with the Bluehost control panel, including performance, security, and update features.",
"author": {
"name": "Bluehost",
Expand Down Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"@heroicons/react": "^2.1.5",
"@newfold-labs/wp-module-ecommerce": "^1.3.42",
"@newfold-labs/wp-module-ecommerce": "^1.3.43",
"@newfold-labs/wp-module-facebook": "1.0.7",
"@newfold-labs/wp-module-runtime": "^1.0.10",
"@newfold/ui-component-library": "^1.1.0",
Expand Down
7 changes: 7 additions & 0 deletions src/app/pages/home/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
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 Home = () => {
const abTestShowMyProducts = NewfoldRuntime.hasCapability(
'abTestShowMyProducts'
);

return (
<Page className="wppbh-home">
<WelcomeSection />
Expand All @@ -17,6 +23,7 @@ const Home = () => {
</div>
</Container.Block>
</Container>
{ abTestShowMyProducts && <MyProductSection /> }
</Page>
);
};
Expand Down
53 changes: 53 additions & 0 deletions src/app/pages/home/myProductsSection.js
Original file line number Diff line number Diff line change
@@ -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 (
<NewfoldMyProducts
methods={ moduleMethods }
constants={ moduleConstants }
/>
);
};

export default MyProductsSection;

0 comments on commit 52f2133

Please sign in to comment.