Skip to content

Commit 429362d

Browse files
authored
Change the empty cart message in WooCommerce Add
1 parent d8a51a7 commit 429362d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"generator":"Code Snippets v2.14.0","date_created":"2021-02-04 21:38","snippets":[{"name":"Change the empty cart message in WooCommerce","desc":"https:\/\/stackoverflow.com\/questions\/51241826\/change-wc-empty-cart-message-function-in-woocommerce-3-1","tags":["change","empty","cart","message","woocommerce"],"scope":"global","code":"remove_action( 'woocommerce_cart_is_empty', 'wc_empty_cart_message', 10 );\nadd_action( 'woocommerce_cart_is_empty', 'custom_empty_cart_message', 10 );\n\nfunction custom_empty_cart_message() {\n $html = '<div class=\"col-12 offset-md-1 col-md-10\"><p class=\"cart-empty\">';\n $html .= wp_kses_post( apply_filters( 'wc_empty_cart_message', __( 'Your cart is currently empty.', 'woocommerce' ) ) );\n echo $html . '<\/p><\/div>';\n}","priority":"10"}]}

0 commit comments

Comments
 (0)