not guaranteed. */ public function flag_abandoned_cart_recovery_enabled_notice( $feature_id, $is_enabled ): void { if ( 'abandoned_cart_recovery' === $feature_id && $is_enabled ) { set_transient( 'wc_abandoned_cart_recovery_enabled_notice', 'yes', MINUTE_IN_SECONDS ); } } /** * Render a success notice after the merchant enables Abandoned cart recovery, * pointing them straight at the email settings page where they actually * configure it. * * Hooks into `woocommerce_settings_advanced` at priority 1, which fires * inside the settings template right after `WC_Admin_Settings::show_messages()` * (the "Your settings have been saved." notice) and before the form fields. * That places our notice in the same visual slot below the tabs, alongside * the standard save confirmation. * * `WC_Admin_Settings::add_message()` would be the cleaner API but escapes * its input via `esc_html()`, which strips the link tag. Direct echo here * keeps the markup intact while still matching the surrounding notice style. * * @internal For exclusive usage of WooCommerce core, backwards compatibility not guaranteed. */ public function maybe_render_abandoned_cart_recovery_enabled_notice(): void { if ( 'yes' !== get_transient( 'wc_abandoned_cart_recovery_enabled_notice' ) ) { return; } delete_transient( 'wc_abandoned_cart_recovery_enabled_notice' ); $settings_url = admin_url( 'admin.php?page=wc-settings&tab=email§ion=wc_email_customer_abandoned_cart_recovery' ); printf( '
%1$s %3$s