Skip to content
Draft
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
13 changes: 13 additions & 0 deletions src/php/Integration/Promotions/Notices/Elementor.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Code_Snippets\Integration\Promotions\Notices;

use Code_Snippets\REST_API\Import\Plugins\Elementor_Custom_Code_Plugin_Importer;

/**
* Promotion class for Elementor Custom Code.
*
Expand Down Expand Up @@ -62,4 +64,15 @@ public function get_promotion_heading(): string {
public function get_promotion_message(): string {
return __( 'Move your custom logic into a dedicated dashboard built for professionals. Experience a cleaner workflow with advanced security and global organization.', 'code-snippets' );
}

/**
* Check if the user should see the migration button.
*
* @return bool Whether the user should see the migration button.
*/
public function show_migration_button(): bool {
$importer = new Elementor_Custom_Code_Plugin_Importer();
$data = $importer->get_data();
return ! empty( $data );
}
}
Loading
Loading