Remove 'Continue shopping' button from checkout on Woocommerce

Asked

Viewed 2,485 times

-1

Botão continuar comprando

Hello, does anyone know how to remove the info and 'continue shopping' button from the checkout on Woocommerce? Instead, I would like to add the description of the kit being purchased.

I would like to leave as image below: Assim

1 answer

1

Looking for "Continue Shopping" in the plugin code, brings to the file wc-cart-functions.php#L88, where is this filter:

wc_add_notice( apply_filters( 'wc_add_to_cart_message', $message, $product_id ) );

The following code in your functions.php or custom plugin would remove the warning:

add_filter( 'wc_add_to_cart_message', '__return_empty_string' );
# pode tentar __return_null também

If there is any trace, it should probably be removed with CSS or editing the relevant file on Theme/Child-Theme used on the website.

And to get to the result you describe, you must filter by product_id and use something like:

add_filter( 'wc_add_to_cart_message', function( $msg, $id ){
    if( $id == SEU_PRODUCT_ID ) $msg = "Produto tal";
    return $msg;
}, 10, 2 );

Browser other questions tagged

You are not signed in. Login or sign up in order to post.