data-product_id
-
I am creating custom buy now button for variation products which adds the variation directly to checkout or cart.
I am using
echo ‘get_id().'” class=”buy-now button”>Buy Now‘; while showing the button but it is getting the product id instead of variation id. but in add to cart code via inspect element i do see data-product_id which actually contains the correct variation id. how to add that field to the custom buy now button?The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘data-product_id’ is closed to new replies.