title = __('Growth Alert 🚀', 'notificationx'); $this->dashboard_title = __('Growth Alert', 'notificationx'); $this->popup = [ "denyButtonText" => __("More Info", "notificationx"), "confirmButtonText" => __("Upgrade to PRO", "notificationx"), // phpcs:disable PluginCheck.CodeAnalysis.Offloading.OffloadedContent -- False positive for this context: these are HTML email bodies and remote documentation/tutorial links in admin help text, not offloaded plugin assets. Audited 2026-07-16. "html"=> __(' Highlight your sales, low stock updates with inline growth alert to boost sales ', 'notificationx') // phpcs:enable PluginCheck.CodeAnalysis.Offloading.OffloadedContent ]; } /** * Hooked to nx_before_metabox_load action. * * @return void */ public function init_fields() { parent::init_fields(); add_filter( 'nx_show_on_exclude', array( $this, 'show_on_exclude' ), 10, 4 ); } /** * Making sure inline notice don't show as normal notice * if pro is disabled. * * @param bool $exclude * @param array $settings * @return bool */ public function show_on_exclude( $exclude, $settings ) { if ( ! empty( $settings['inline_location'] ) && $this->id === $settings['type'] ) { return true; } return $exclude; } public function is_stock_theme( $theme ) { $themes = [ 'woocommerce_sales_inline_stock-theme-one', 'woocommerce_sales_inline_stock-theme-two' ]; if ( in_array( $theme, $themes, true ) ) { return true; } return false; } public function nx_can_entry( $result, $entry, $settings ) { if ( $this->is_stock_theme( $settings['themes'] ) ) { return false; } return $result; } }