Categories
WooCommerce

WooCommerce Cart Page Customization

Modify “Update cart” button text for mobile view:

add_filter( 'gettext', 'condless_change_update_cart_text', 20, 3 );
function condless_change_update_cart_text( $translated, $text, $domain ) {
	if ( wp_is_mobile() && is_cart() && $translated == 'Update cart' ) {
		$translated = 'Update it';
	}
	return $translated;
}

Remove the product added/removed messages:

add_filter( 'wc_add_to_cart_message_html', '__return_null' );
add_filter( 'woocommerce_cart_item_removed_notice_type', '__return_null' );

Leave a Reply

Your email address will not be published. Required fields are marked *