Skip to content

Commit e305f68

Browse files
authored
Merge pull request #754 from newfold-labs/update/0-2802
Temporary: hide onboarding restart cards
2 parents 71aa8e9 + 26cb0dc commit e305f68

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

includes/WP_Admin.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public function __construct() {
3333
\add_action( 'admin_menu', array( __CLASS__, 'register_page' ) );
3434
\add_action( 'load-dashboard_page_' . self::$slug, array( __CLASS__, 'page_title' ), 9, 1 );
3535
\add_action( 'load-dashboard_page_' . self::$slug, array( __CLASS__, 'initialize' ) );
36+
\add_action( 'load-toplevel_page_bluehost', array( __CLASS__, 'hide_onboarding_restart_card' ) );
3637
\add_action( 'load-themes.php', array( __CLASS__, 'can_restart_onboarding' ) );
3738
if ( 'sitegen' === Data::current_flow() ) {
3839
\add_action( 'load-themes.php', array( __CLASS__, 'mark_sitegen_generated_themes' ) );
@@ -317,7 +318,38 @@ public static function can_restart_onboarding(): void {
317318
'all'
318319
);
319320

321+
/**
322+
* Temporary: hide the build with ai button
323+
*/
324+
wp_add_inline_style(
325+
'onboarding-restart-button',
326+
'.themes .theme.build-with-ai {
327+
display: none !important;
328+
}'
329+
);
330+
320331
\wp_enqueue_script( 'onboarding-restart-button' );
321332
\wp_enqueue_style( 'onboarding-restart-button' );
322333
}
334+
335+
/**
336+
* Temporary: Enqueue scripts that hides the build with ai button
337+
*
338+
* @return void
339+
*/
340+
public static function hide_onboarding_restart_card(): void {
341+
\wp_register_style(
342+
'hide-onboarding-restart-card',
343+
false,
344+
);
345+
346+
\wp_add_inline_style(
347+
'hide-onboarding-restart-card',
348+
'div[data-testid="restartOnboarding"] {
349+
display: none !important;
350+
}'
351+
);
352+
353+
\wp_enqueue_style( 'hide-onboarding-restart-card' );
354+
}
323355
} // END /NewfoldLabs/WP/Module/Onboarding/Admin()

tests/cypress/integration/5-AI-SiteGen-onboarding-flow/8-restart-onboarding.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const {
44
SingleEventsAPI,
55
} = require('../wp-module-support/single-events-track.cy');
66

7-
describe('Restart Onboarding', function () {
7+
describe.skip('Restart Onboarding', function () {
88
before(() => {
99
// Create the option for Restarting Onboarding
1010
cy.exec(

0 commit comments

Comments
 (0)