Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jakewhiteley/8ac5a289527c4f22ec450c82cbd3ab6d to your computer and use it in GitHub Desktop.
Save jakewhiteley/8ac5a289527c4f22ec450c82cbd3ab6d to your computer and use it in GitHub Desktop.
<?php
add_action( 'woocommerce_after_checkout_validation', 'set_persitent_checkout' );
function set_persitent_checkout ( $a )
{
$arr = array();
foreach ( $a as $key => $value )
if ( ! empty($value) )
$arr[$key] = $value;
WC()->session->set( 'form_data', $arr );
return $a;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment