I'm sending a form from a woocommerce plugin.
I've tweaked the thankyou.php page and added email sending functionality.
However the $_POST array is empty.
Inspecting with Chrome Dev Tools I found that there is temporary redirect from the posted page:
The relevant form code: (in /woocommerce/templates/checkout/form-checkout.php)
<form enctype="multipart/form-data" name="checkout" method="post" id="checky" class="checky" action="http://pharma-job.shared6.lighthost.co.il/checkout/order-received">
<input type="hidden" name="admin_email" value="<?php echo get_option('admin_email'); ?>" />
<?php if ( sizeof( $woocommerce_checkout->checkout_fields ) > 0 ) : ?>
<?php do_action( 'woocommerce_checkout_before_customer_details'); ?>
<div class="col2-set" id="customer_details">
<div class="col-1">
<?php do_action('woocommerce_checkout_billing'); ?>
</div>
<div class="col-2">
<?php do_action('woocommerce_checkout_shipping'); ?>
</div>
</div>
<label for="cv_file">העלה קו"ח: </label>
<input type="file" name="cv_file">
<?php do_action( 'woocommerce_checkout_after_customer_details'); ?>
<h3 id="order_review_heading"><?php _e('Your order', 'woocommerce'); ?></h3>
<?php endif; ?>
<?php do_action('woocommerce_checkout_order_review'); ?>
</form>
I looked at the generated HTML and found what appears to be the smoking gun:
<input type="hidden" name="_wp_http_referer" value="/checkout/" />
But what is the mechanism behind this redirect? How do I bypass it?