wolnik
Forum Replies Created
-
The problem is with below deprecated option in WooCommerce version 2.1:
get_permalink(get_option('woocommerce_thanks_page_id'))
Above needs to be replaced with the following, where $this is an instance of WC_Order class:
$this->get_return_url($this->order)
Sean, thanks! It does work out of the box now.
Great plugin!
You’re welcome, dirkse!
The newest 0.27 version of the plugin hasn’t got above fix applied so the operation needs to be repeated.
Actually it should be replaced by below:
if ($this->send_to_stripe()) { $this->completeOrder(); $result = array( 'result' => 'success', 'redirect' => $this->get_return_url($this->order) ); return $result; }
Now it works!
Replace below code located in /plugins/stripes/strip-gateway.php#177:
if ($this->send_to_stripe()) { $this->completeOrder(); return array( 'result' => 'success', 'redirect' => add_query_arg( 'order', $this->order->id, add_query_arg( 'key', $this->order->order_key, get_permalink(get_option('woocommerce_thanks_page_id')) ) ) ); }
to [1]
if ($this->send_to_stripe()) { $this->completeOrder(); wp_redirect($this->get_return_url($this->order)); exit; }
[1] https://develop.woothemes.com/woocommerce/2013/11/woocommerce-2-1-beta-1-is-ready/ (Getting page permalinks (e.g. in gateways))
Hi Anne, Sean,
I have actually got the same issue with WooCommerce 2.1.
The problem was in /plugins/wp-content/striper/stripe_gateway.php file.
Line: 188.
WooCommerce 2.1. doesn’t have ‘woocommerce_thanks_page_id’ option anymore. I have added my own page number instead and it works now. But I still need to find the new WooCommerce 2.1. thank you page ??
The problem was because get_permalink was returing /wp-admin/ajax.php as a URL.
Kind regards