woothemes/woocommerce — Issue #470: _GET Variables Being Unset
Author: patrickgarman
Created: 2012-01-07 22:44:27+00:00
State: open

Not sure if it is all parts of the store but at least on the checkout / thank you pages the _GET variables are being unset.

Ran into issues with _GET while developing the Samurai gateway and now I've found on the thank you page the variables are not there as well. Code below shows $order being set by _GET['order'] which is in the URL however the variable is unset. So $order gets set to 0 and the entire if statement is bypassed. Actions are within the if statement.

Running v1.3.2.1
Tested Multiple Themes (Woo & Twenty Ten/Eleven)

function woocommerce_thankyou( $atts ) {
global $woocommerce;

// Pay for order after checkout step
if (isset($_GET['order'])) $order_id = $_GET['order']; else $order_id = 0;
if (isset($_GET['key'])) $order_key = $_GET['key']; else $order_key = '';

// Empty awaiting payment session
unset($_SESSION['order_awaiting_payment']);

if ($order_id > 0) :