WP SITES

3086 Coded Tutorials & 292 Plugins

How To Create Checkout URLs for WC Products

Let’s take a look at 2 ways to create shareable checkout URL’s for WooCommerce products using manual URL creation and a plugin which automatically creates the URL’s and sends them via email.

You can also add a coupon code which is automatically applied to the checkout page order summary.

METHOD 1 : Manual URL-Based Approach

The simplest way to create shareable checkout URLs is by using WooCommerce’s built-in URL parameters. This method allows you to add products to the cart and apply coupons directly through the URL.

URL Format :

https://yourstore.com/checkout-link/?products=123:2,456:1&coupon=SPRING10

Breaking Down the URL :

  • Base URL: Your checkout page URL (e.g., https://yourstore.com/checkout-link/)
  • products parameter: Product IDs with quantities
  • Format: product_id:quantity
  • Multiple products: Separate with commas (e.g., 123:2,456:1)
  • Example: 123:2 means product ID 123 with quantity 2
  • coupon parameter: Optional coupon code to apply automatically

How to Use Method 1 :

  1. Find Your Product IDs:
    • Go to Products in your WordPress admin
    • Edit a product and check the URL: post.php?post=123&action=edit
    • The number after “post=” is your product ID
  2. Construct Your URL:
    • Start with your checkout page URL
    • Add ?products= followed by product_id:quantity
    • Add &coupon= followed by your coupon code (optional)
  3. Examples:
    • Single product: https://yourstore.com/checkout-link/?products=123:1
    • Multiple products: https://yourstore.com/checkout-link/?products=123:2,456:1
    • With coupon: https://yourstore.com/checkout-link/?products=123:1&coupon=SPRING10
    • Multiple products with coupon: https://yourstore.com/checkout-link/?products=123:2,456:1&coupon=SPRING10

METHOD 2 : Shareable URLs for WooCommerce Plugin

For a more robust solution with advanced features, the Shareable URLs for WooCommerce plugin provides a easy way for create, email and track shareable checkout URLs.

How to Use Method 2 :

  1. Install the Plugin:
  2. Generate Shareable URLs:
    • Navigate to WooCommerce > Bulk Shareable URLs
    • Select products using the product search field
    • (Optional) Select a coupon code to apply automatically
    • (Optional) Set a custom redirect URL (defaults to checkout page)
    • Click Generate URLs
  3. Send Emails (Optional):
    • Enable email sending
    • Choose recipients: “All Customers” or “Custom Emails”
    • Enter email addresses if using custom emails (comma-separated)
    • Enter email subject and message
    • Use placeholders: {customer_name}, {customer_first_name}, {customer_last_name}, {customer_email}, {site_name}, {site_url}, {shareable_url}
  4. Track Performance:
    • View all generated URLs in the statistics table
    • See click counts for each URL
    • View associated products and email recipient information
    • Delete individual URLs or bulk delete multiple URLs

URL Format:
Generated URLs follow this format:
https://yoursite.com/share/{unique-token}

When a user clicks a shareable URL:

  1. The product is automatically added to their cart
  2. If a coupon code is set, it is automatically applied
  3. The user is redirected to the checkout page (or custom redirect URL if specified)
  4. The click is tracked in the statistics

Leave a Reply

New Plugins