Last active
July 4, 2017 05:48
-
-
Save bhavik-kiri/5461a0af8d2a6ba7c7d19d742691d774 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/** | |
* Save the persistent cart when the cart is updated. | |
*/ | |
public function persistent_cart_update() { | |
update_user_meta( get_current_user_id(), '_woocommerce_persistent_cart', | |
array( 'cart' => WC()->session->get( 'cart' ), | |
) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment