|
/ Documentation /Features/ How to Add Products to the Checkout Page via URL

How to Add Products to the Checkout Page via URL

CartFlows Pro includes a feature that allows you to add products directly to the Checkout page using URL parameters. This makes it easy to dynamically pre-fill the cart based on the link a user clicks — great for personalized offers, email campaigns, and landing pages.

This documentation explains how the feature works, how to structure your URLs, and how to find the product ID required for this functionality.

How the Feature Works

This feature is enabled by default in CartFlows Pro — there’s no need to activate it manually. All you need to do is:

  • Use a product ID in the URL to add that item to the cart on the Checkout page
  • Optionally include the quantity for each item

When a user opens the Checkout page URL with the appropriate parameter(s), the specified product(s) will automatically appear in the cart.

URL Parameters Format

To add a product to the Checkout page via URL, use the following parameters:

  • ?wcf-add-to-cart=product_id
  • &wcf-qty=quantity (optional – defaults to 1 if not specified)

Single Product Example

If you want to add Product ID 3 with a quantity of 4, the URL would look like:

https://yourdomain.com/checkout-page/?wcf-add-to-cart=3&wcf-qty=4

If you omit the wcf-qty parameter, the default quantity will be 1.

Multiple Products Example

To add multiple products with different quantities, separate each ID and quantity with commas. For example:

https://yourdomain.com/checkout-page/?wcf-add-to-cart=3,6&wcf-qty=4,8

This will add Product ID 3 with quantity 4 and Product ID 6 with quantity 8.

Important Notes

If you’ve already selected products in the backend of the Checkout step, and you also pass product IDs via URL — only the products from the URL will be used. The backend-selected products will be ignored.

How to Find the Product ID

To locate a product’s ID in WooCommerce:

  1. Go to Products > All Products in your WordPress admin
  2. Hover your mouse over the product title
  3. You’ll see the product ID appear below the product title
Product ID
Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
On this page
Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Free Cartflows Form - Popup

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.