Sale! Tested Updated Perfect rating Documented

URL Coupons for WooCommerce

(1 customer review)

From: $19.99 / year

WooCommerce URL coupons.

$29.99 $19.99 Single site1 year of updates and support30-day money-back guaranteeBuy
$79.99 $49.99 Unlimited sites1 year of updates and support30-day money-back guaranteeBuy
$149.99 $79.99Unlimited sitesLifetime updates and support30-day money-back guaranteeBuy
Clear

Description

URL Coupons for WooCommerce plugin allows your customers to apply coupons via URL, for example, via http://example.com/?alg_apply_coupon=couponcode.

Options

Settings are located in “WooCommerce > Settings > URL Coupons”.

General Options

URL Coupons for WooCommerce - General Options

URL coupons key
URL key. If you change this, make sure it’s unique and is not used anywhere on your site (e.g. by another plugin). Your customers can apply shop’s standard coupons by visiting URL. E.g.: http://example.com/?alg_apply_coupon=couponcode.
Default: alg_apply_coupon
Force session start
Enable this if URL coupons are not being applied to the guests (i.e. not logged users).
Default: no
Add products to cart
Automatically adds coupon’s products to the cart for “Fixed product discount” type coupons.
Default: no
Add products to cart: Empty cart
Clear the cart before adding the coupon’s products.
Default: no

Hide Coupon Options

URL Coupons for WooCommerce - Hide Coupon Options

Hide coupon on cart page
Enable this if you want to hide standard coupon input field on the cart page.
Default: no
Hide coupon on checkout page
Enable this if you want to hide standard coupon input field on the checkout page.
Default: no

Redirect Options

URL Coupons for WooCommerce - Redirect Options

Redirect URL
Redirect when coupon code is successfully applied. Possible values: No redirect; Redirect to cart; Redirect to checkout; Redirect to custom local URL.
Default: No redirect
Redirect URL: Custom local URL
Used only if “Redirect to custom local URL” value is selected in “Redirect URL” option.
Default: None
Redirect URL per coupon
Will add “URL Coupons: Redirect URL” field to each coupon admin edit page.
Default: no

URL Coupons for WooCommerce - Redirect URL per coupon

Notice Options

URL Coupons for WooCommerce - Notice Options

Delay notice
Delay the “Coupon code applied successfully” notice if the cart is empty when applying a URL coupon. Notice will be delayed until there is at least one product in the cart.
Default: no
Custom notice
Custom notice to be displayed when coupon code is successfully applied. Ignored if empty.
Default: None
Notice per coupon
Will add “URL Coupons: Notice” field to each coupon admin edit page.
Default: no

URL Coupons for WooCommerce - Notice per coupon

Notice per coupon: Override global notice
This will remove the global “Custom notice” notice, in case if there are any “per coupon” notices to display.
Default: no
Override default notice
This will remove the default “Coupon code applied successfully” notice, in case if there are any custom notices to display.
Default: no
Notice method
Possible values: “Add” or “Append”. This makes a difference only if you have multiple notices displayed: “Add” option will add it as a new notice (i.e. will display it as a multiple notices), while “Append” option will merge it with the existing notice, for example, with the default “Coupon was successfully applied” notice (i.e. will display it as a single notice). Possible values: Add; Append.
Default: Add
Notice type
Ignored, unless “Notice method” option is set to “Add”. Possible values: Success; Error; Notice.
Default: Success
Notice glue
Ignored, unless “Notice method” option is set to “Append”.
Default:

<br>

Advanced Options

URL Coupons for WooCommerce - Advanced Options

Hook priority
Priority for the main plugin hook. Leave empty for the default priority.
Default: None
Remove "add to cart" key
Will remove add-to-cart key on “Redirect URL > No redirect” option.
Default: yes
Force coupon redirect
Force coupon redirect after add-to-cart action.
Default: no
Extra cookie
Enable this if you want to set cookie when URL coupon has been applied. Cookie name will be alg_wc_url_coupons.
Default: no
Extra cookie: Expiration
The time the cookie expires. In seconds.
Default: 1209600
WP Rocket: Disable empty cart caching
Check this if you have “WP Rocket” plugin installed, and having issues with cart being empty after you apply URL coupon and add a product.
Default: no

Shortcodes

If you are using URL to a page where no WooCommerce notices are displayed, try adding our [alg_wc_url_coupons_print_notices] shortcode to the content. Please note that this shortcode will print all available WooCommerce notices (i.e. not only from our plugin, or notices related to the coupons).

1 review for URL Coupons for WooCommerce

  1. blank

    Eugenio

    Great Plugin – Very good assistance
    The plugin works fine and it does what it says.
    The assistance’s been very helpful in helping us with an issue.

    Thx

    • blank

      Tom Anbinder

      Thank you!

Add a review

Your email address will not be published. Required fields are marked *

14 thoughts on "URL Coupons for WooCommerce"

  1. Hi,
    Is it possibile to concatenate url with coupon apply to the add product to cart?
    Not sure about it: I’m trying but I didn’t succeded.
    Thx

    1. Hi Eugenio,

      Generally, you should be able to do that with something like this:

      http://example.com/cart/?add-to-cart=2495&alg_apply_coupon=test

      Is it not working? If that’s the case – could you please post the exact URL you are trying it with? Also – are you adding simple products? Or variable products maybe?

    2. Hi, it is actually a simple product.
      The URL I’m trying is as follow:
      https://www.revoring.com/carrello/?add-to-cart=90498&cpn=offerta-home

      I do not get what am I missing… 🙁

    3. Hi Eugenio,

      Sorry for the late reply.

      I did check it, and it looks weird indeed. Both params (i.e. add-to-cart and cpn) work properly when used separately, however, add-to-cart seems to be blocking cpn for some reason when used together… Could I log in to your site to check what’s going on (my email is [email protected])? Please let me know if sharing an account is not an option, and I will continue solving it remotely.

    4. If anyone else has a similar question – although I wasn’t able to reproduce the issue on my test server, after logging in to Eugenio’s site, I’ve managed to fix it. Generally, our “apply coupon” action was called later than “add to cart” action for some reason. I’m not sure why, as it’s working differently on my test server, but it may be some compatibility issue with some other plugin installed on the server. I ended up adding two new options to the plugin (in v1.3.1): Hook priority and Remove “add to cart” key. Both options are in the “Advanced” settings section of our plugin (in “WooCommerce > Settings > URL Coupons”). So now if you lower the “Hook priority” to 10, and disable the “Remove ‘add to cart’ key” checkbox, it all seems to be working fine.

  2. Hi, again me, since we use your plugin, many clients write us, that when they add a product to cart and go to cartpage, they get the message No products in the cart and the cart is empty. I tried it many times and i really see that its true. When i put the product a second time into the cart, then it works.

    Check: shaveclick.ch/?coupon=test

    Maybe sometimes it works but often it really does not work.

    We use WP Rocket for caching, i read something in google that this could may be the reason wjy this happens.

    Can you please urgently help fixing that?

    The couponcode “test” is just for testing.

    Please contact me as soon s possible.

    We also have second shop: linsenklick.ch/?coupon=test

    Here same problem. 🙁

    1. Hi Elton,

      Would it be possible for me to log in to your site to check what’s going on (my email is [email protected]). And FTP access would also help a lot.

  3. After i installed the Pro-Plugin the tab in woocommerce -> Settings – >URL Coupons disappear …

    Can you fix the bug?

    Best regards,
    Martin

    1. Hi Martin,

      That’s odd… Are you sure Pro plugin is enabled on your “Plugins” page? If it is – maybe I could log in to your site and check what’s going on (my email is [email protected])?

  4. Hi, we use your plugin URL Coupons for Woocommerce and I see that it does just work, when a client is logged in? Why is it not possible for customers who are not logged in?

    This should also work for these clients. Can you please help me?

    Please check:

    https://shaveclick.ch/?coupon=test

    you can create then an account to see that it works just with logged users.

    Thanks

    Elton Ferati

    1. Hi Elton,

      Sorry for the late reply. I believe the problem is that for a coupon to be applied for a guest user, there must be something added to the cart before that, i.e. coupons can not be applied to an empty cart for guests. I will have to find a solution to this – will get back to you asap. Meanwhile, it looks like you can “solve” this by adding some product via URL at the same time when applying the coupon. For example:

      http://example.com/cart/?add-to-cart=2495&coupon=test

      Also, in Pro version, there is “Add products to cart” (for “Fixed product discount” type coupons) option, which seems to be solving the problem for “fixed product discount” coupons at least.

    2. Hi Elton,

      This is now fixed in the latest plugin v1.2.3. To make the coupons work for the guests with an empty cart, you need to enable the new “Force session start” checkbox in plugin’s settings (in “WooCommerce > Settings > URL Coupons”).

      Please give it a try and let me know if there are still any issues.

  5. Hi All,
    With the help of your plugin. I am not able to get the “excluded_product_categories” and “excluded_product_ids” parameter. Please check the below-returned object. Please let me know how can I get these variables. “coupon20” is my coupon code.
    Thanks

     Array ( [coupon20] => WC_Coupon Object ( [data:protected] => Array ( [code] => coupon20 [amount] => 50 [date_created] => WC_DateTime Object ( [utc_offset:protected] => 0 [date] => 2019-10-09 13:17:10.000000 [timezone_type] => 1 [timezone] => +00:00 ) [date_modified] => WC_DateTime Object ( [utc_offset:protected] => 0 [date] => 2020-02-03 12:21:17.000000 [timezone_type] => 1 [timezone] => +00:00 ) [date_expires] => WC_DateTime Object ( [utc_offset:protected] => 0 [date] => 2020-05-30 00:00:00.000000 [timezone_type] => 1 [timezone] => +00:00 ) [discount_type] => percent [description] => [usage_count] => 0 [individual_use] => 1 [product_ids] => Array ( [0] => 21769 ) [excluded_product_ids] => Array ( ) [usage_limit] => 100000 [usage_limit_per_user] => 100000 [limit_usage_to_x_items] => 100000 [free_shipping] => [product_categories] => Array ( [0] => 3938 [1] => 4524 [2] => 4327 ) [excluded_product_categories] => Array ( [0] => 3935 [1] => 4299 ) [exclude_sale_items] => [minimum_amount] => [maximum_amount] => [email_restrictions] => Array ( ) [used_by] => Array ( ) [virtual] => ) [cache_group:protected] => coupons [id:protected] => 3604 [changes:protected] => Array ( ) [object_read:protected] => 1 [object_type:protected] => data [extra_data:protected] => Array ( ) [default_data:protected] => Array ( [code] => [amount] => 0 [date_created] => [date_modified] => [date_expires] => [discount_type] => fixed_cart [description] => [usage_count] => 0 [individual_use] => [product_ids] => Array ( ) [excluded_product_ids] => Array ( ) [usage_limit] => 0 [usage_limit_per_user] => 0 [limit_usage_to_x_items] => [free_shipping] => [product_categories] => Array ( ) [excluded_product_categories] => Array ( ) [exclude_sale_items] => [minimum_amount] => [maximum_amount] => [email_restrictions] => Array ( ) [used_by] => Array ( ) [virtual] => ) [data_store:protected] => WC_Data_Store Object ( [instance:WC_Data_Store:private] => WC_Coupon_Data_Store_CPT Object ( [meta_type:protected] => post [internal_meta_keys:protected] => Array ( [0] => _code [1] => _amount [2] => _date_created [3] => _date_modified [4] => _date_expires [5] => _discount_type [6] => _description [7] => _usage_count [8] => _individual_use [9] => _product_ids [10] => _excluded_product_ids [11] => _usage_limit [12] => _usage_limit_per_user [13] => _limit_usage_to_x_items [14] => _free_shipping [15] => _product_categories [16] => _excluded_product_categories [17] => _exclude_sale_items [18] => _minimum_amount [19] => _maximum_amount [20] => _email_restrictions [21] => _used_by [22] => _virtual [23] => discount_type [24] => coupon_amount [25] => expiry_date [26] => date_expires [27] => usage_count [28] => individual_use [29] => product_ids [30] => exclude_product_ids [31] => usage_limit [32] => usage_limit_per_user [33] => limit_usage_to_x_items [34] => free_shipping [35] => product_categories [36] => exclude_product_categories [37] => exclude_sale_items [38] => minimum_amount [39] => maximum_amount [40] => customer_email [41] => _used_by [42] => _edit_lock [43] => _edit_last ) [object_id_field_for_meta:protected] => [must_exist_meta_keys:protected] => Array ( ) ) [stores:WC_Data_Store:private] => Array ( [coupon] => WC_Coupon_Data_Store_CPT [customer] => WC_Customer_Data_Store [customer-download] => WC_Customer_Download_Data_Store [customer-download-log] => WC_Customer_Download_Log_Data_Store [customer-session] => WC_Customer_Data_Store_Session [order] => WC_Order_Data_Store_CPT [order-refund] => WC_Order_Refund_Data_Store_CPT [order-item] => WC_Order_Item_Data_Store [order-item-coupon] => WC_Order_Item_Coupon_Data_Store [order-item-fee] => WC_Order_Item_Fee_Data_Store [order-item-product] => WC_Order_Item_Product_Data_Store [order-item-shipping] => WC_Order_Item_Shipping_Data_Store [order-item-tax] => WC_Order_Item_Tax_Data_Store [payment-token] => WC_Payment_Token_Data_Store [product] => WC_Product_Data_Store_CPT [product-grouped] => WC_Product_Grouped_Data_Store_CPT [product-variable] => WC_Product_Variable_Data_Store_CPT [product-variation] => WC_Product_Variation_Data_Store_CPT [shipping-zone] => WC_Shipping_Zone_Data_Store [webhook] => WC_Webhook_Data_Store ) [current_class_name:WC_Data_Store:private] => WC_Coupon_Data_Store_CPT [object_type:WC_Data_Store:private] => coupon ) [meta_data:protected] => Array ( [0] => WC_Meta_Data Object ( [current_data:protected] => Array ( [id] => 14667 [key] => _wc_url_coupons_redirect_page [value] => 0 ) [data:protected] => Array ( [id] => 14667 [key] => _wc_url_coupons_redirect_page [value] => 0 ) ) [1] => WC_Meta_Data Object ( [current_data:protected] => Array ( [id] => 14681 [key] => _wc_url_coupons_unique_url [value] => coupon20 ) [data:protected] => Array ( [id] => 14681 [key] => _wc_url_coupons_unique_url [value] => coupon20 ) ) ) ) ) 
    1. Hi,

      I’m not sure if I understood your question correctly, but if you need to get excluded product IDs from WC_Coupon object, you need to call:

      $coupon->get_excluded_product_ids();

      and for the excluded category IDs:

      $coupon->get_excluded_product_categories();

      P.S. I’m not sure how you’ve formed the array in your example, but you should be able to get the object itself with:

      $coupon = $your_array['coupon20'];

      Hope that helps.

Leave a Reply

Your email address will not be published. Required fields are marked *

Changelog

1.4.0 - 12/01/2021

  • Dev - General Options - Add products to cart - "Empty cart" option added.
  • Dev - "Notice" options added ("Custom notice", "Notice per coupon", "Notice method", "Override default notice", etc.). "Delay notice" option moved to this new section.
  • Dev - Notice Options - Delay notice - Now delaying notice only if coupon was successfully applied.
  • Dev - Notice Options - [alg_wc_url_coupons_print_notices] shortcode added.
  • Dev - Redirect Options - "Redirect URL per coupon" option added.
  • Dev - Redirect Options - Now redirecting only if coupon was successfully applied.
  • Dev - Localisation - load_plugin_textdomain moved to the init action.
  • Dev - Admin settings restyled. Subsections added.
  • Dev - Code refactoring.
  • WC tested up to: 4.9.

1.3.2 - 22/12/2020

  • Dev - Advanced - "Force coupon redirect" option added.
  • Tested up to: 5.6.
  • WC tested up to: 4.8.

1.3.1 - 28/10/2020

  • Dev - Advanced - "Hook priority" option added.
  • Dev - Advanced - "Remove 'add to cart' key" option added.
  • WC tested up to: 4.6.

1.3.0 - 09/10/2020

  • Dev - Code refactoring.

1.2.8 - 10/09/2020

  • Dev - Advanced - "WP Rocket: Disable empty cart caching" option added.
  • WC tested up to: 4.5.

1.2.7 - 07/09/2020

  • Dev - "Extra cookie" options added.

1.2.6 - 31/08/2020

  • Fix - Delay notice - Checking for empty cart now.
  • Dev - Code refactoring.

1.2.5 - 31/08/2020

  • Dev - "Delay notice" option added.

1.2.4 - 31/08/2020

  • Dev - alg_wc_url_coupons_before_coupon_applied and alg_wc_url_coupons_after_coupon_applied actions added.
  • Dev - Code refactoring.

1.2.3 - 20/08/2020

  • Dev - "Force session start" option added.
  • Tested up to: 5.5.
  • WC tested up to: 4.4.

1.2.2 - 02/04/2020

  • Dev - Removing add-to-cart query argument on redirect now.

1.2.1 - 01/04/2020

  • Dev - "Hide coupon on checkout page" option added.
  • Tested up to: 5.4.

1.2.0 - 27/03/2020

  • Fix - "Reset settings" admin notice fixed.
  • Dev - Code refactoring.
  • Dev - Admin settings descriptions updated.
  • WC tested up to: 4.0.
  • Tested up to: 5.3.

1.1.0 - 27/07/2019

  • Dev - Code refactoring.
  • Dev - Admin settings - Settings restyled; descriptions updated; "Your settings have been reset" notice added.
  • Localisation domain name fixed.
  • Plugin URI updated.
  • WC tested up to: 3.6.
  • Tested up to: 5.2.

1.0.0 - 15/08/2017

  • Initial Release.

Free vs Pro

This plugin is a premium version of free "URL Coupons for WooCommerce" plugin.

Free VersionPro Version
URL coupons keyyesyes
Force session startyesyes
Add products to cartnoyes
Hide coupon on cart pageyesyes
Hide coupon on checkout pageyesyes
Redirect URLnoyes
Redirect URL per couponnoyes
Delay noticeyesyes
Custom noticenoyes
Notice per couponnoyes
Override default noticenoyes
Notice methodnoyes
Advanced Optionsyesyes

Installation and Updates

  • Buy the plugin 🙂
  • Download plugin's zip to your computer (you will receive an email with download link, or you can always download the plugin from your account).
  • Go to "Admin Dashboard > Plugins > Add New > Upload Plugin" and browse for downloaded zip file.
  • If plugin is successfully installed - you should see it added to the Plugins list.
  • To keep WPFactory items up to date, please install WPFactory Helper plugin and enter your site key.

Refunds

We want to ensure that you are 100% happy with your purchase, so if you feel the product(s) you purchased are not the best fit for your requirements and you attempted to resolve issues with product's author, we are offering 30 day money back guarantee refund policy.