Automattic\WooCommerce\Internal\StockNotifications

StockSyncController::store_admin_noticeprivateWC 1.0

Store the admin notice.

Method of the class: StockSyncController{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->store_admin_notice( $product_id ): void;
$product_id(int) (required)
The product ID to sync.

StockSyncController::store_admin_notice() code WC 10.3.6

private function store_admin_notice( $product_id ): void {
	if ( ! is_admin() || ! function_exists( 'wp_admin_notice' ) ) {
		return;
	}

	/* translators: 1 = URL of the Back in Stock Notifications page */
	$notice_message = sprintf( __( 'Back-in-stock notifications for this product are now being processed. Subscribed customers will receive these emails over the next few minutes. You can monitor or manage individual subscriptions on the <a href="%s">Stock Notifications page</a>.', 'woocommerce' ), sprintf( admin_url( 'admin.php?page=wc-customer-stock-notifications&customer_stock_notifications_product_filter=%d&status=active_customer_stock_notifications&filter_action=Filter' ), $product_id ) );

	update_option( 'wc_customer_stock_notifications_product_sync_notice', $notice_message );
}