0

I am setting up a woocommerce shop and I want to add a new page between the shopping cart and the final payment. I currently have my cart page (cart. php), and for example the finalize purchase button, be "next", on this new page I want to add a number of functions and the finalize purchase button to make the final payment.

By default the configuration is: product page -> shopping cart -> payment_final. My idea is to add one more page to this cycle: product page -> shopping cart -> My_page_with_other_options -> final payment.

What files would I have to touch to modify the purchase cycle?

A greeting and thank you in advance.

Manu
  • 319
  • 1
  • 2
  • 10
  • you can change the `checkout button url` to `My_page_with_other_options ` page url – Vel Jan 19 '18 at 13:30

1 Answers1

0

Try like this

add_action( 'woocommerce_widget_shopping_cart_buttons', function(){
    // Removing Buttons
    remove_action( 'woocommerce_widget_shopping_cart_buttons', 'woocommerce_widget_shopping_cart_proceed_to_checkout', 20 );

    // Adding customized Buttons
    add_action( 'woocommerce_widget_shopping_cart_buttons', 'custom_widget_shopping_cart_proceed_to_checkout', 20 );
}, 1 );



// Custom Checkout button
function custom_widget_shopping_cart_proceed_to_checkout() {   
    $custom_link = 'your page url'; 
    echo '<a href="' . esc_url( $custom_link ) . '" class="button checkout wc-forward">' . esc_html__( 'Checkout', 'woocommerce' ) . '</a>';
}

Change cart and checkout button links on WooCommerce mini cart widget

Vel
  • 9,027
  • 6
  • 34
  • 66
  • Thank you for answering the question but this solution don't work for me. I don't want to modify the widget also I want to modify the link of the main button cart and checkout in products. Your code only change the links of the widget button. Regards. – Manu Jan 22 '18 at 09:08
  • do you want to change cart button or checkout button? – Vel Jan 22 '18 at 10:02