Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e-tests/specs/onboarding.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ test.describe('Onboarding', () => {
page.getByRole('heading', { name: 'We are importing your new' }),
).toBeVisible();

await page.waitForSelector('.ob-import-done', { timeout: 10000 });
await page.waitForSelector('.ob-import-done', { timeout: 60000 });

await expect(page.getByRole('textbox', { name: 'Enter your email' })).toBeVisible();
await expect(page.locator('#inspector-select-control-0')).toBeVisible(); // User experience selector.
Expand Down
31 changes: 31 additions & 0 deletions includes/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public function init() {
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );
add_filter( 'ti_tpc_editor_data', array( $this, 'add_tpc_editor_data' ), 20 );
add_action( 'admin_init', array( $this, 'activation_redirect' ) );
add_filter( 'themeisle_sdk_blackfriday_data', array( $this, 'add_black_friday_data' ) );

$this->setup_white_label();

Expand Down Expand Up @@ -719,6 +720,8 @@ public function enqueue() {
);
}
}

do_action( 'themeisle_internal_page', TIOB_BASENAME, 'onboarding' );
}

$is_tiob_page = strpos( $screen->id, '_page_tiob-plugin' ) !== false;
Expand Down Expand Up @@ -746,6 +749,8 @@ public function enqueue() {
wp_enqueue_script( 'tiob' );

wp_set_script_translations( 'tiob', 'templates-patterns-collection' );

do_action( 'themeisle_internal_page', TIOB_BASENAME, 'onboarding' );
}

/**
Expand Down Expand Up @@ -1390,4 +1395,30 @@ private function get_prefix_for_menu_item() {

return $prefix;
}

/**
* Add Black Friday data.
*
* @param array $configs The configuration array for the loaded products.
*
* @return array
*/
public function add_black_friday_data( $configs ) {
$config = $configs['default'];

// translators: %1$s - plugin name, %2$s - HTML tag, %3$s - discount, %4$s - HTML tag, %5$s - company name.
$message_template = __( 'Brought to you by the team behind %1$s— our biggest sale of the year is here: %2$sup to %3$s OFF%4$s on premium products from %5$s! Limited-time only.', 'templates-patterns-collection' );

$config['message'] = sprintf( $message_template, 'Starter Sites & Templates by Neve', '<strong>', '70%', '</strong>', '<strong>Themeisle</strong>' );
$config['sale_url'] = add_query_arg(
array(
'utm_term' => 'free',
),
tsdk_translate_link( tsdk_utmify( 'https://themeisle.link/all-bf', 'bfcm', 'templates-patterns-collection' ) )
);

$configs[ TIOB_BASENAME ] = $config;

return $configs;
}
}
Loading