Last active
July 4, 2017 06:53
-
-
Save bhavik-kiri/e72ac19c2d921e579f617fa294941ef7 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_' . get_current_blog_id(), | |
array( 'cart' => WC()->session->get( 'cart' ), | |
) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment