WC_Shortcode_Checkout::print_notice
Print a notice inside the shared notices wrapper.
Method of the class: WC_Shortcode_Checkout{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = WC_Shortcode_Checkout::print_notice( $message, $notice_type ): void;
- $message(string) (required)
- Notice text.
- $notice_type(string) (required)
- Notice type: error, success or notice.
WC_Shortcode_Checkout::print_notice() WC Shortcode Checkout::print notice code WC 11.3.0
private static function print_notice( $message, $notice_type ): void {
echo '<div class="woocommerce-notices-wrapper">' . wc_print_notice( $message, $notice_type, array(), true ) . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- wc_print_notice() returns kses-filtered markup.
}