mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-04 12:22:24 +08:00
https://stackoverflow.com/questions/69071212/remove-checkout-is-not-available-whilst-your-cart-is-empty-notice-in-woocomme/69071415
10 lines
397 B
Text
10 lines
397 B
Text
function filter_woocommerce_add_notice ( $message ) {
|
|
// Equal to (Must be exactly the same).
|
|
// If the message is displayed in another language, adjust where necessary!
|
|
if ( $message == 'Checkout is not available whilst your cart is empty.' ) {
|
|
return false;
|
|
}
|
|
|
|
return $message;
|
|
}
|
|
add_filter( 'woocommerce_add_notice', 'filter_woocommerce_add_notice', 10, 1 );
|