Automattic\WooCommerce\Internal\StockNotifications
StockSyncController::output_admin_notice
Add admin notices.
Method of the class: StockSyncController{}
No Hooks.
Returns
null. Nothing (null).
Usage
$StockSyncController = new StockSyncController(); $StockSyncController->output_admin_notice(): void;
StockSyncController::output_admin_notice() StockSyncController::output admin notice code WC 10.3.6
public function output_admin_notice(): void {
if ( ! function_exists( 'wp_admin_notice' ) ) {
return;
}
$notice_message = get_option( 'wc_customer_stock_notifications_product_sync_notice' );
if ( empty( $notice_message ) ) {
return;
}
\wp_admin_notice(
$notice_message,
array(
'type' => 'info',
'id' => 'woocommerce_customer_stock_notifications_product_sync_notice',
'dismissible' => false,
)
);
delete_option( 'wc_customer_stock_notifications_product_sync_notice' );
}