Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

WooC - Change "order-pay" page WordPress

Hi

How do I modify the "order-pay" page?
I got woocommerce 2.2.4


I want to put a link there that says "Change Payment Option"
And go back with javascript?

Answers (3)

2015-04-17

Arnav Joy answers:

there is thankyou.php file under checkout folder , you can edit it.


FirstEntertainment comments:

How can I edit it, so the changes only happens to the "pay" page and not thank you also?

2015-04-17

Bob answers:

I have a rough Idea that woocommerce has thank you action.

Please try following code in your theme's functions.php file

It should add button at the end of main content which will take user back to page.

add_action('woocommerce_thankyou',"thankyou_extra_content");
function thankyou_extra_content(){
echo '<input action="action" type="button" value="Change Payment Method" onclick="history.go(-1);" />';
}


Are your sure going back will allow user to change the payment method? I don't think the woocommerce will allow it.
However give it a try.

Arnav is also right

You theme might have a template file you can edit it. It should be located at YOURTHEME/woocommerce/checkout/thankyou.php

if you don't found that file you can copy it from woocommerce plugin and create same directory structure and put it there.
In the plugin it should be located at wp-content\plugins\woocommerce\templates\checkout\thanyou.php


FirstEntertainment comments:

"Are your sure going back will allow user to change the payment method? I don't think the woocommerce will allow it.
However give it a try."

This would not work? Hmm. I guess I have to try.

Is there any "correct" way of sending some back to the checkout? Preferably without forcing customers to re-enter their credentials.


2015-04-19

Jayaram Y answers:

Once the order is placed, you cannot go back and change the payment option.
You can edit the template and add a link there to go back to checkout page. But that creates a dublicate order.