Empty cart no message help
-
Hi I haven’t updated to 8.6 because it looks like there are errors from reading posts.
I have an issue though when on the cart page and hit the cross to empty there is no message. Now I am using a custom function to add more to it than just a message, so how can I get it to work on the cart page please. It works when there are no products in the cart, just not when there is:remove_action( 'woocommerce_cart_is_empty', 'wc_empty_cart_message', 10); add_action( 'woocommerce_cart_is_empty', 'custom_add_content_empty_cart' ); function custom_add_content_empty_cart() { if ( !is_wc_endpoint_url( 'order-received' ) && WC()->cart->get_cart_contents_count() == 0 ) { echo '<div class="custom-empty">'; echo '<span class="empty-cart-icon"></span>'; echo '<h2>Your Cart Is Currently Empty!</h2>'; echo '<p>Looks like you have not made your choice yet.</p>'; echo '<a class="button wc-backward" href="' . esc_url( home_url( '/' ) ) . '">Go Shopping</a>'; echo '</div>'; } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Empty cart no message help’ is closed to new replies.