Skip to content

Commit 06d5a8a

Browse files
author
moon
committed
Add HelloWorld component to /hello-world WC page
1 parent b9fdba4 commit 06d5a8a

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/index.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ const PaymentGatewaySuggestions = lazy( () =>
4646
)
4747
);
4848

49+
const HelloWorld = lazy( () =>
50+
import( /* webpackChunkName: "hello-world" */ './hello-world' )
51+
);
52+
4953
wcNavFilterRootUrl();
5054

5155
if ( !! window.wcCalypsoBridge.isEcommercePlanTrial ) {
@@ -93,7 +97,7 @@ if ( !! window.wcCalypsoBridge.isEcommercePlanTrial ) {
9397
'wc-admin-onboarding-task-payments',
9498
'woocommerce-admin-task-wcpay', // WCPay task item which handles direct click on the task. (Not needed in free trial)
9599
'woocommerce-admin-task-wcpay-page', // WCPay task page which handles URL navigation to the task.
96-
'wc-admin-onboarding-task-tax',
100+
'wc-admin-onboarding-task-tax'
97101
);
98102

99103
// Add slot fill for payments task.
@@ -203,6 +207,20 @@ if ( !! window.wcCalypsoBridge.isEcommercePlan ) {
203207
}
204208
}
205209

210+
addFilter( 'woocommerce_admin_pages_list', 'wc-calypso-bridge', ( pages ) => {
211+
pages.push( {
212+
container: HelloWorld,
213+
path: '/hello-world',
214+
breadcrumbs: [ 'Hello', 'World' ],
215+
navArgs: {
216+
id: 'hello-world',
217+
},
218+
capability: 'manage_woocommerce',
219+
} );
220+
221+
return pages;
222+
} );
223+
206224
addAction(
207225
'plugins.pluginRegistered',
208226
'wc-calypso-bridge',

0 commit comments

Comments
 (0)