Created
June 12, 2016 20:13
-
-
Save jakewhiteley/8ac5a289527c4f22ec450c82cbd3ab6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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