Automattic\WooCommerce\Internal\StockNotifications

StockSyncController::store_admin_notice │ private │ WC 1.0

Store the admin notice.

Метод класса: StockSyncController{}

Хуков нет.

Возвращает

void. Ничего (null).

Использование

// private - только в коде основоного (родительского) класса
$result = $this->store_admin_notice( $product_id ): void;
$product_id(int) (обязательный)
The product ID to sync.

Код StockSyncController::store_admin_notice() WC 11.2.2

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 );
}