WooCommerce – How to trigger save data to cart
-
Hi everyone,
I’m attempting to save custom data to the WooCommerce cart session.
While saving to the cart session when a user clicks add to cart on a product and product page is documented and pretty straight forward using
woocommerce_add_cart_item_data
.I’m having trouble wrapping my head around saving custom data on a custom page not linked to a product.
What I’d like to do is replicate the add to cart action, which would save my data to the cart session and send the user to the checkout page upon being clicked.
Does anyone have any direction they can share on this?
- The topic ‘WooCommerce – How to trigger save data to cart’ is closed to new replies.