FAQ WooHelpDesk Latest Questions

Mark Miller
  • 0
  • 0
What is the Shortcode for the add to Cart Button in WooCommerce?
  • 0
  • 0

In WooCommerce, the shortcode to display an Add to Cart button for a specific product is:

[add_to_cart id=”PRODUCT_ID”]

Replace PRODUCT_ID with the actual ID of the product you want to link to. You can find the product ID in the product edit page under the “Product data” section.

This shortcode creates a simple button that, when clicked, will add the specified product to the user’s cart. It is especially useful for custom pages, blog posts, or widgets where you want to showcase individual products with a direct add-to-cart action.