Change “Proceed To Checkout” Button Location Woocommerce

I want to add a new page in between the cart and checkout pages on woocommerce shop.

How can i change the “proceed to checkout” url on the standard cart page to link to my new page called “extras”

Read More

This new extras page will offer the customer an extra product they can add to their cart and then proceed back to the checkout page as normal.

Related posts

1 comment

  1. Below code will change the URL of the Proceed to Checkout.

    remove_action('woocommerce_proceed_to_checkout', 'woocommerce_button_proceed_to_checkout', 20);
    
    add_action('woocommerce_proceed_to_checkout', 'change_url_to_checkout', 20);
    
    function change_url_to_checkout(){
            $extra_url = 'put_your_extra_page_url_here';
            ?>
            <a href="<?php echo $extra_url; ?>" class="checkout-button button alt wc-forward"><?php _e( 'Proceed to Checkout', 'woocommerce' ); ?></a>
            <?php   
    }
    

    WooCommerce add that url with action and does not provide filter to change the URL. So we need to remove action and again need to add_action to achieve.

Comments are closed.