{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Extended Coupon Features for WooCommerce More coupon and discount options for WooCommerce. Soft79 Created: 2014-08-30 Latest update: 2024-10-06 Extended Coupon Features for WooCommerce is an easy-to-use WordPress / WooCommerce plugin that adds functionality to the WooCommerce coupon system. The functionality is conveniently integrated to the standard WooCommerce Edit Coupon panel therefore the plugin is extremely easy to use. What can be achieved with this plugin? Create discounts that will automatically be applied to the customer\u2019s cart when certain conditions are met. Extended coupon restrictions Restrict coupon by shipping method, Restrict coupon by payment method, Restrict coupon by customer credentials or customer role Restrict coupon by combinations of products (e.g. buy both A and B and get 20% off!) Restrict coupon by amount of matching products (e.g. buy three products from category C and get a free product!) Apply coupon using an url (PRO) Give away free products (PRO) BOGO (Buy One Get One) (PRO) Limit product discount to: One per order line, cheapest product or cheapest order line www.soft79.nl","title":"About"},{"location":"auto-updates/","text":"Automatic updates (PRO) To receive automatic updates, you need to enter the licence key. NOTE: This is only possible if you purchased the plugin at soft79.nl. Go to: wp-admin > Settings > Extended Coupon Features for WooCommerce Enter the domain and licence key. The licence will be automatically activated. To deactivate a licence key for a domain (e.g. to move it to a different domain) just empty the fields and save the settings. The licence will automatically be deactivated for the domain and can be used on a different domain. You can also manage you licence activations from your account page at soft79.nl.","title":"Automatic updates (PRO)"},{"location":"auto-updates/#automatic-updates-pro","text":"To receive automatic updates, you need to enter the licence key. NOTE: This is only possible if you purchased the plugin at soft79.nl. Go to: wp-admin > Settings > Extended Coupon Features for WooCommerce Enter the domain and licence key. The licence will be automatically activated. To deactivate a licence key for a domain (e.g. to move it to a different domain) just empty the fields and save the settings. The licence will automatically be deactivated for the domain and can be used on a different domain. You can also manage you licence activations from your account page at soft79.nl.","title":"Automatic updates (PRO)"},{"location":"development/","text":"Development Filters and Actions These filters are called by Extended Coupon Features for WooCommerce: apply_filters( 'wjecf_apply_with_other_coupons', true, $the_coupon, $applied_coupon_codes ) ); apply_filters( 'wjecf_bogo_product_amount_for_coupon', $qty, $coupon ); apply_filters( 'wjecf_bogo_products_to_apply_for_coupon', $bogos, $coupon ); apply_filters( 'wjecf_coupon_can_be_applied', $can_be_applied, $coupon ); apply_filters( 'wjecf_coupon_has_a_value', $has_a_value, $coupon ); apply_filters( 'wjecf_coupon_item_quantity', $item_quantity, $coupon, $item, $wc_discounts ); apply_filters( 'wjecf_coupon_multiplier_value', $coupon_multiplier_values, $coupon, $wc_discounts ); apply_filters( 'wjecf_first_order_statuses_to_check', $order_statuses ); apply_filters( 'wjecf_free_cart_item_price', __('Free!', 'woocommerce'), $price_html, $cart_item, $cart_item_key ); apply_filters( 'wjecf_free_cart_item_subtotal', __('Free!', 'woocommerce'), $price_html, $cart_item, $cart_item_key ); apply_filters( 'wjecf_free_product_amount_for_coupon', $coupon_qty, $coupon ); apply_filters( 'wjecf_free_products_to_apply_for_coupon', $free_product_quantities, $coupon ) apply_filters( 'wjecf_get_limit_to_options', $options ); apply_filters( 'wjecf_is_first_purchase', $is_first_purchase ); apply_filters( 'wjecf_set_free_product_amount_in_cart', $quantity, $product ); apply_filters( 'wjecf_set_free_product_amount_in_cart', $quantity, $product, $variation ) These actions are called by Extended Coupon Features for WooCommerce: do_action( 'wjecf_admin_after_settings' ); do_action( 'wjecf_admin_before_settings' ); do_action( 'wjecf_after_update_matched_autocoupons' ); do_action( 'wjecf_assert_coupon_is_valid', $coupon ); do_action( 'wjecf_before_update_matched_autocoupons' ); do_action( 'wjecf_coupon_metabox_checkout', $thepostid, $post ); do_action( 'wjecf_coupon_metabox_customer', $thepostid, $post ); do_action( 'wjecf_coupon_metabox_free_products', $thepostid, $post ); do_action( 'wjecf_coupon_metabox_misc', $thepostid, $post ); do_action( 'wjecf_coupon_metabox_products', $thepostid, $post ); do_action( 'wjecf_init_plugins'); do_action( 'wjecf_woocommerce_coupon_options_extended_features', $thepostid, $post ); Programming additional rules for 'Limit discount to' apply_filters( 'wjecf_get_limit_to_options', $options )` filter allows developers to append rules for 'Limit to:'. Rules can be added to the $options -array with these properties: $key => [ 'function' => $callback_function, 'title' => $title ] $key = The key that identifies the 'Limit to'-rule. $title = The title of the 'Limit to'-rule. $function = The callback with functionality of the rule. Callback must have this signature: function callback_function( $coupon, $discountable_items ) $discountable_items are stdClass objects as generated by WC_Discounts. The callback must return an array with the maximum amount of items to be discounted. [ $item_key => $discount_limit, ... ] Discount-quantity of cart_items that are not in the array will not be limited. Create mini-plugins for Extended Coupon Features You can further extend functionality of Extended Coupon Features for WooCommerce by creating your own mini-plugins. Hook into the wjecf_init_plugins -action. (Using this hook guarantees that the WooCommerce and Extended Coupon Features for WooCommerce plugins are loaded) Here, create a class that extends Abstract_WJECF_Plugin . Create a constructor __construct() , where you setup the plugin data by calling $this->set_plugin_data Create a function init_hook() , where you setup your plugin and define frontend hooks. Create a function init_admin_hook() , where you setup your plugin for admin usage and define admin hooks. (Version 2.5.1+ only) If your plugin need to handle custom meta fields, use the WooCommerce meta box functions (e.g. woocommerce_wp_select ). To handle the sanitization of these fields, create a function admin_coupon_meta_fields( $coupon ) and have it return an array [ 'field_name' => 'sanitization', ... ] . Upon saving a coupon, these fields will be automatically read from $_POST and sanitized with the given sanitization method, e.g. 'int' , 'int[]' , 'yesno' , 'decimal' , 'clean' or even a callback: [ 'callback' => callback ] and saved to the current coupon. For versions prior to 2.5.1, you need to handle process_shop_coupon_meta yourself. Load the class by calling WJECF()->add_plugin( 'NameOfYourClass') Example: to avoid naming conflicts const META_KEY_WEEKDAY = '_wjecf_example_plugin_weekday'; /** * In the constructor you can supply general information about your WJECF-plugin. */ public function __construct() { $this->set_plugin_data( array( 'description' => __( 'WJECF Example plugin - Accept a coupon on certain weekdays only.', 'your-text-domain' ), 'dependencies' => array(), 'minimal_wjecf_version' => '2.5.1', 'can_be_disabled' => true ) ); } //FRONTEND /** * This function is called when WooCommerce and all other plugins are loaded. * Here you can setup frontend hooks. */ public function init_hook() { add_action( 'woocommerce_coupon_is_valid', array( $this, 'filter_woocommerce_coupon_is_valid' ), 10, 2 ); } /** * Invalidates the coupon if the weekday is not ok * @param bool $valid * @param WC_Coupon $coupon * @return bool False if invalid */ public function filter_woocommerce_coupon_is_valid( $valid, $coupon ) { if ( is_callable( array( $coupon, 'get_meta' ) ) ) { //WC3.0+ $coupon_weekday = $coupon->get_meta( self::META_KEY_WEEKDAY ); } else { //Older WC versions $coupon_weekday = get_post_meta( $coupon->id, self::META_KEY_WEEKDAY, true ); } //Not valid if the weekday differs if ( is_numeric( $coupon_weekday ) && date('w') != $coupon_weekday ) { return false; } return $valid; } //ADMIN /** * This function is called when WooCommerce and all other plugins are loaded and we are on the admin section of WordPress. * Here you can setup admin hooks. */ public function init_admin_hook() { add_action( 'woocommerce_coupon_options_usage_restriction', array( $this, 'action_woocommerce_coupon_options_usage_restriction' ), 9999 ); //9999 is at the bottom of the tab } /** * Automatically called at the process_shop_coupon_meta action (WJECF 2.5.1+ only). * * Returns an array [ meta_key => sanitizion_rule, ... ] with the meta fields that must be saved if the user clicks 'Update' on the coupon admin page. * * Valid sanitizion rules are: 'html', 'clean', 'yesno', 'decimal', 'int', 'int[]' (array of ints), 'int,' (comma separated ints) * * $_POST[meta_key] will be sanitized and automatically saved. * * @since 2.5.1 * @param WC_Coupon $coupon The coupon that will be saved * @return array An array with [ key => sanitizion_rule, ... ] */ public function admin_coupon_meta_fields( $coupon ) { return array( self::META_KEY_WEEKDAY => 'int' ); } /** * This is called when the usage restrictions tab is rendered. */ public function action_woocommerce_coupon_options_usage_restriction() { woocommerce_wp_select( array( 'id' => self::META_KEY_WEEKDAY, 'label' => __( 'Weekday', 'woocommerce-jos-autocoupon' ), 'options' => array( '' => '(Always valid)', 0 => 'Sunday', 1 => 'Monday', 2 => 'Tuesday', 3 => 'Wednesday', 4 => 'Thursday', 5 => 'Friday', 6 => 'Saturday' ), 'description' => __( 'Coupon is only valid on this weekday.', 'your-text-domain' ), 'desc_tip' => true ) ); } } //Loads the plugin! WJECF()->add_plugin( 'WJECF_Plugin_Example' ); }","title":"Development"},{"location":"development/#development","text":"","title":"Development"},{"location":"development/#filters-and-actions","text":"These filters are called by Extended Coupon Features for WooCommerce: apply_filters( 'wjecf_apply_with_other_coupons', true, $the_coupon, $applied_coupon_codes ) ); apply_filters( 'wjecf_bogo_product_amount_for_coupon', $qty, $coupon ); apply_filters( 'wjecf_bogo_products_to_apply_for_coupon', $bogos, $coupon ); apply_filters( 'wjecf_coupon_can_be_applied', $can_be_applied, $coupon ); apply_filters( 'wjecf_coupon_has_a_value', $has_a_value, $coupon ); apply_filters( 'wjecf_coupon_item_quantity', $item_quantity, $coupon, $item, $wc_discounts ); apply_filters( 'wjecf_coupon_multiplier_value', $coupon_multiplier_values, $coupon, $wc_discounts ); apply_filters( 'wjecf_first_order_statuses_to_check', $order_statuses ); apply_filters( 'wjecf_free_cart_item_price', __('Free!', 'woocommerce'), $price_html, $cart_item, $cart_item_key ); apply_filters( 'wjecf_free_cart_item_subtotal', __('Free!', 'woocommerce'), $price_html, $cart_item, $cart_item_key ); apply_filters( 'wjecf_free_product_amount_for_coupon', $coupon_qty, $coupon ); apply_filters( 'wjecf_free_products_to_apply_for_coupon', $free_product_quantities, $coupon ) apply_filters( 'wjecf_get_limit_to_options', $options ); apply_filters( 'wjecf_is_first_purchase', $is_first_purchase ); apply_filters( 'wjecf_set_free_product_amount_in_cart', $quantity, $product ); apply_filters( 'wjecf_set_free_product_amount_in_cart', $quantity, $product, $variation ) These actions are called by Extended Coupon Features for WooCommerce: do_action( 'wjecf_admin_after_settings' ); do_action( 'wjecf_admin_before_settings' ); do_action( 'wjecf_after_update_matched_autocoupons' ); do_action( 'wjecf_assert_coupon_is_valid', $coupon ); do_action( 'wjecf_before_update_matched_autocoupons' ); do_action( 'wjecf_coupon_metabox_checkout', $thepostid, $post ); do_action( 'wjecf_coupon_metabox_customer', $thepostid, $post ); do_action( 'wjecf_coupon_metabox_free_products', $thepostid, $post ); do_action( 'wjecf_coupon_metabox_misc', $thepostid, $post ); do_action( 'wjecf_coupon_metabox_products', $thepostid, $post ); do_action( 'wjecf_init_plugins'); do_action( 'wjecf_woocommerce_coupon_options_extended_features', $thepostid, $post );","title":"Filters and Actions"},{"location":"development/#programming-additional-rules-for-limit-discount-to","text":"apply_filters( 'wjecf_get_limit_to_options', $options )` filter allows developers to append rules for 'Limit to:'. Rules can be added to the $options -array with these properties: $key => [ 'function' => $callback_function, 'title' => $title ] $key = The key that identifies the 'Limit to'-rule. $title = The title of the 'Limit to'-rule. $function = The callback with functionality of the rule. Callback must have this signature: function callback_function( $coupon, $discountable_items ) $discountable_items are stdClass objects as generated by WC_Discounts. The callback must return an array with the maximum amount of items to be discounted. [ $item_key => $discount_limit, ... ] Discount-quantity of cart_items that are not in the array will not be limited.","title":"Programming additional rules for 'Limit discount to'"},{"location":"development/#create-mini-plugins-for-extended-coupon-features","text":"You can further extend functionality of Extended Coupon Features for WooCommerce by creating your own mini-plugins. Hook into the wjecf_init_plugins -action. (Using this hook guarantees that the WooCommerce and Extended Coupon Features for WooCommerce plugins are loaded) Here, create a class that extends Abstract_WJECF_Plugin . Create a constructor __construct() , where you setup the plugin data by calling $this->set_plugin_data Create a function init_hook() , where you setup your plugin and define frontend hooks. Create a function init_admin_hook() , where you setup your plugin for admin usage and define admin hooks. (Version 2.5.1+ only) If your plugin need to handle custom meta fields, use the WooCommerce meta box functions (e.g. woocommerce_wp_select ). To handle the sanitization of these fields, create a function admin_coupon_meta_fields( $coupon ) and have it return an array [ 'field_name' => 'sanitization', ... ] . Upon saving a coupon, these fields will be automatically read from $_POST and sanitized with the given sanitization method, e.g. 'int' , 'int[]' , 'yesno' , 'decimal' , 'clean' or even a callback: [ 'callback' => callback ] and saved to the current coupon. For versions prior to 2.5.1, you need to handle process_shop_coupon_meta yourself. Load the class by calling WJECF()->add_plugin( 'NameOfYourClass') Example: to avoid naming conflicts const META_KEY_WEEKDAY = '_wjecf_example_plugin_weekday'; /** * In the constructor you can supply general information about your WJECF-plugin. */ public function __construct() { $this->set_plugin_data( array( 'description' => __( 'WJECF Example plugin - Accept a coupon on certain weekdays only.', 'your-text-domain' ), 'dependencies' => array(), 'minimal_wjecf_version' => '2.5.1', 'can_be_disabled' => true ) ); } //FRONTEND /** * This function is called when WooCommerce and all other plugins are loaded. * Here you can setup frontend hooks. */ public function init_hook() { add_action( 'woocommerce_coupon_is_valid', array( $this, 'filter_woocommerce_coupon_is_valid' ), 10, 2 ); } /** * Invalidates the coupon if the weekday is not ok * @param bool $valid * @param WC_Coupon $coupon * @return bool False if invalid */ public function filter_woocommerce_coupon_is_valid( $valid, $coupon ) { if ( is_callable( array( $coupon, 'get_meta' ) ) ) { //WC3.0+ $coupon_weekday = $coupon->get_meta( self::META_KEY_WEEKDAY ); } else { //Older WC versions $coupon_weekday = get_post_meta( $coupon->id, self::META_KEY_WEEKDAY, true ); } //Not valid if the weekday differs if ( is_numeric( $coupon_weekday ) && date('w') != $coupon_weekday ) { return false; } return $valid; } //ADMIN /** * This function is called when WooCommerce and all other plugins are loaded and we are on the admin section of WordPress. * Here you can setup admin hooks. */ public function init_admin_hook() { add_action( 'woocommerce_coupon_options_usage_restriction', array( $this, 'action_woocommerce_coupon_options_usage_restriction' ), 9999 ); //9999 is at the bottom of the tab } /** * Automatically called at the process_shop_coupon_meta action (WJECF 2.5.1+ only). * * Returns an array [ meta_key => sanitizion_rule, ... ] with the meta fields that must be saved if the user clicks 'Update' on the coupon admin page. * * Valid sanitizion rules are: 'html', 'clean', 'yesno', 'decimal', 'int', 'int[]' (array of ints), 'int,' (comma separated ints) * * $_POST[meta_key] will be sanitized and automatically saved. * * @since 2.5.1 * @param WC_Coupon $coupon The coupon that will be saved * @return array An array with [ key => sanitizion_rule, ... ] */ public function admin_coupon_meta_fields( $coupon ) { return array( self::META_KEY_WEEKDAY => 'int' ); } /** * This is called when the usage restrictions tab is rendered. */ public function action_woocommerce_coupon_options_usage_restriction() { woocommerce_wp_select( array( 'id' => self::META_KEY_WEEKDAY, 'label' => __( 'Weekday', 'woocommerce-jos-autocoupon' ), 'options' => array( '' => '(Always valid)', 0 => 'Sunday', 1 => 'Monday', 2 => 'Tuesday', 3 => 'Wednesday', 4 => 'Thursday', 5 => 'Friday', 6 => 'Saturday' ), 'description' => __( 'Coupon is only valid on this weekday.', 'your-text-domain' ), 'desc_tip' => true ) ); } } //Loads the plugin! WJECF()->add_plugin( 'WJECF_Plugin_Example' ); }","title":"Create mini-plugins for Extended Coupon Features"},{"location":"usage-checkout/","text":"Checkout On the checkout-tab restrictions can be entered that will normally only be active when the customer initiates checkout. Shipping methods The coupon will only validate if the customer selects one of these shipping methods or shipping zones. Payment methods The coupon will only validate if the customer selects one of these payment methods. Customer restrictions Allowed customer Specify one or more customers here, and the coupon will only be valid if the customer is logged in and included in this list. Allowed user roles Specify one or more user roles, and the coupon will only be valid if the customer has one of the selected roles (e.g., Wholesale Buyer or Guest). Disallowed user roles The coupon will only be valid if the customer does not have any of the specified user roles (e.g., Wholesale Buyer or Guest).","title":"Checkout"},{"location":"usage-checkout/#checkout","text":"On the checkout-tab restrictions can be entered that will normally only be active when the customer initiates checkout.","title":"Checkout"},{"location":"usage-checkout/#shipping-methods","text":"The coupon will only validate if the customer selects one of these shipping methods or shipping zones.","title":"Shipping methods"},{"location":"usage-checkout/#payment-methods","text":"The coupon will only validate if the customer selects one of these payment methods.","title":"Payment methods"},{"location":"usage-checkout/#customer-restrictions","text":"","title":"Customer restrictions"},{"location":"usage-checkout/#allowed-customer","text":"Specify one or more customers here, and the coupon will only be valid if the customer is logged in and included in this list.","title":"Allowed customer"},{"location":"usage-checkout/#allowed-user-roles","text":"Specify one or more user roles, and the coupon will only be valid if the customer has one of the selected roles (e.g., Wholesale Buyer or Guest).","title":"Allowed user roles"},{"location":"usage-checkout/#disallowed-user-roles","text":"The coupon will only be valid if the customer does not have any of the specified user roles (e.g., Wholesale Buyer or Guest).","title":"Disallowed user roles"},{"location":"usage-free-products/","text":"Free products In the 'Free products'-field on the 'Free products'-tab you can enter one or more products that will automatically be added to the cart when the coupon is applied. The product will automatically be removed when the coupon is no longer valid. Watch video If you tick the 'select one'-checkbox, the customer must choose one (or more) of the selected products on the cart or checkout page. The customer can also choose the desired variations of a variable product. You can also edit the message that is displayed. If you wish to change the look-and-feel of the product selection you must create a subdirectory woocommerce-auto-added-coupons-pro in your themes directory and copy and edit the files templates/cart/select-free-product.php and templates/checkout/select-free-product.php in here. Multiplication of free products When the \"Allow multiplication of the free products\" option is checked, the number of free products will increase each time the minimum spend, subtotal, or quantity threshold is met. For example, if the minimum spend is set to $50 and the cart total is $160, the free products will be added three times to the cart. BOGO matching products When the customer purchases one or more of the matching products (as specified in the Usage Restrictions -tab), they will receive one free. To give a free item for each matching product in the cart, check the \"Allow multiplication\" option.","title":"Free products"},{"location":"usage-free-products/#free-products","text":"In the 'Free products'-field on the 'Free products'-tab you can enter one or more products that will automatically be added to the cart when the coupon is applied. The product will automatically be removed when the coupon is no longer valid. Watch video If you tick the 'select one'-checkbox, the customer must choose one (or more) of the selected products on the cart or checkout page. The customer can also choose the desired variations of a variable product. You can also edit the message that is displayed. If you wish to change the look-and-feel of the product selection you must create a subdirectory woocommerce-auto-added-coupons-pro in your themes directory and copy and edit the files templates/cart/select-free-product.php and templates/checkout/select-free-product.php in here.","title":"Free products"},{"location":"usage-free-products/#multiplication-of-free-products","text":"When the \"Allow multiplication of the free products\" option is checked, the number of free products will increase each time the minimum spend, subtotal, or quantity threshold is met. For example, if the minimum spend is set to $50 and the cart total is $160, the free products will be added three times to the cart.","title":"Multiplication of free products"},{"location":"usage-free-products/#bogo-matching-products","text":"When the customer purchases one or more of the matching products (as specified in the Usage Restrictions -tab), they will receive one free. To give a free item for each matching product in the cart, check the \"Allow multiplication\" option.","title":"BOGO matching products"},{"location":"usage-limits/","text":"Additional usage limits The following option is added to the Usage limits -tab: Limit discount to (PRO) Easily control which items are eligible for discounts. By combining this feature with a 100% discount coupon, you can create flexible \"Buy X, Pay Y\" rules. For example, using the \"Limit discount to every nth item\" setting along with a \"minimum matching quantity of products\" set to 3, allows you to offer a discount where every 3rd item in the cart is free. Developers can program additional discount limiting rules by using the wjecf_get_limit_to_options -filter. One item per order line Applies the discount to a maximum of one item per order line. Lowest priced product (single item) Applies the discount only to the lowest-priced matching product. Lowest priced order line (all items) Applies the discount to the lowest-priced order line. Every nth item Applies the discount to every n th item in the cart. Note: n is the minimum quantity of matching products set in the Usage Restrictions tab (or defaults to 2 if not specified). Nth item onwards Applies the discount starting from the nth item in the cart and for all subsequent items. n Lowest priced products. Discounts the n lowest-priced products in the cart. Note: n is determined by how many times the coupon applies, based on either the subtotal or the quantity of matching products.","title":"Additional usage limits"},{"location":"usage-limits/#additional-usage-limits","text":"The following option is added to the Usage limits -tab:","title":"Additional usage limits"},{"location":"usage-limits/#limit-discount-to-pro","text":"Easily control which items are eligible for discounts. By combining this feature with a 100% discount coupon, you can create flexible \"Buy X, Pay Y\" rules. For example, using the \"Limit discount to every nth item\" setting along with a \"minimum matching quantity of products\" set to 3, allows you to offer a discount where every 3rd item in the cart is free. Developers can program additional discount limiting rules by using the wjecf_get_limit_to_options -filter.","title":"Limit discount to (PRO)"},{"location":"usage-limits/#one-item-per-order-line","text":"Applies the discount to a maximum of one item per order line.","title":"One item per order line"},{"location":"usage-limits/#lowest-priced-product-single-item","text":"Applies the discount only to the lowest-priced matching product.","title":"Lowest priced product (single item)"},{"location":"usage-limits/#lowest-priced-order-line-all-items","text":"Applies the discount to the lowest-priced order line.","title":"Lowest priced order line (all items)"},{"location":"usage-limits/#every-nth-item","text":"Applies the discount to every n th item in the cart. Note: n is the minimum quantity of matching products set in the Usage Restrictions tab (or defaults to 2 if not specified).","title":"Every nth item"},{"location":"usage-limits/#nth-item-onwards","text":"Applies the discount starting from the nth item in the cart and for all subsequent items.","title":"Nth item onwards"},{"location":"usage-limits/#n-lowest-priced-products","text":"Discounts the n lowest-priced products in the cart. Note: n is determined by how many times the coupon applies, based on either the subtotal or the quantity of matching products.","title":"n Lowest priced products."},{"location":"usage-misc/","text":"Miscellaneous Auto coupon You can easily turn a coupon into a discount rule by selecting the Auto coupon -checkbox in the Miscellaneous tab. When using this option, be sure to enter a description for the coupon, as this will be displayed to the customer. Once activated, the discount will automatically apply to the cart when the coupon conditions are met, and the description will be shown to the customer, both in the cart and during checkout. If the conditions are no longer met (e.g., the customer removes an item), the discount will be removed. Apply silently When this box is checked, no 'Discount applied' notice will be presented when the coupon is applied. Allow applying when invalid (PRO) When the box 'Allow applying when invalid' is ticked, a customer can always add the coupon to the cart, but will be presented with a message that the discount will only apply when the conditions are met. NOTE: This option is not available for 'Auto coupons'. Coupon by URL Now you can easily create a link that will automatically apply a coupon to the user's cart, optionally in combination with a product. Simply append ?apply_coupon=coupon_code to the url. If you also want to add products to the cart with the same url, you can use add-to-cart=product_id and optionally a quantity. You can find the id of a product on the WooCommerce Edit-page of the product. Example: (http://www.your-store.nl/cart/?add-to-cart=4321&quantity=3&apply_coupon=my_coupon)[#] If the customer opens the url when the conditions of the coupon are not yet met or the cart is empty the coupon won't be applied yet, instead the following message will be displayed: Coupon will be applied once it's conditions are met. Once the conditions of the coupon are met it will be applied automatically.","title":"Miscellaneous"},{"location":"usage-misc/#miscellaneous","text":"","title":"Miscellaneous"},{"location":"usage-misc/#auto-coupon","text":"You can easily turn a coupon into a discount rule by selecting the Auto coupon -checkbox in the Miscellaneous tab. When using this option, be sure to enter a description for the coupon, as this will be displayed to the customer. Once activated, the discount will automatically apply to the cart when the coupon conditions are met, and the description will be shown to the customer, both in the cart and during checkout. If the conditions are no longer met (e.g., the customer removes an item), the discount will be removed.","title":"Auto coupon"},{"location":"usage-misc/#apply-silently","text":"When this box is checked, no 'Discount applied' notice will be presented when the coupon is applied.","title":"Apply silently"},{"location":"usage-misc/#allow-applying-when-invalid-pro","text":"When the box 'Allow applying when invalid' is ticked, a customer can always add the coupon to the cart, but will be presented with a message that the discount will only apply when the conditions are met. NOTE: This option is not available for 'Auto coupons'.","title":"Allow applying when invalid (PRO)"},{"location":"usage-misc/#coupon-by-url","text":"Now you can easily create a link that will automatically apply a coupon to the user's cart, optionally in combination with a product. Simply append ?apply_coupon=coupon_code to the url. If you also want to add products to the cart with the same url, you can use add-to-cart=product_id and optionally a quantity. You can find the id of a product on the WooCommerce Edit-page of the product. Example: (http://www.your-store.nl/cart/?add-to-cart=4321&quantity=3&apply_coupon=my_coupon)[#] If the customer opens the url when the conditions of the coupon are not yet met or the cart is empty the coupon won't be applied yet, instead the following message will be displayed: Coupon will be applied once it's conditions are met. Once the conditions of the coupon are met it will be applied automatically.","title":"Coupon by URL"},{"location":"usage-restrictions/","text":"Additional usage restrictions Several features are added to the Usage Restriction -tab of the coupon edit page. Here extra rules can be configured that work in combination with the Products, Exclude products, Product categories and Exclude categories rules. AND Products (not OR) By default a coupon validates if only one of the selected products is in the cart. Check this box if ALL of the products entered on the Usage Restriction -tab must be in the cart to validate the coupon. The word 'OR' or 'AND' is displayed next to the 'Products'-field on the Usage Restriction -tab for clarification. AND Categories (not OR) By default a coupon validates if a product from any of the selected categories is in the cart. Check this box if products from ALL of the categories entered on the Usage Restriction -tab must be in the cart to validate the coupon. The word 'OR' or 'AND' is displayed next to the Products -field on the Usage Restriction -tab for clarification. Minimum/maximum quantity of matching products The coupon will only validate if the number of products matching the product or category restrictions (on the Usage Restriction -tab in the cart is within this range. If no product or category restriction is entered, the total quantity of all of the products in the cart will be used. Minimum/maximum subtotal of matching products The coupon will only validate if the total value of the products matching the product or category restrictions (on the Usage Restriction -tab in the cart is within this range. If no product or category restriction is entered, the total value of all of the products in the cart will be used. Please note: The difference between this option and the 'minimum/maximum spend' on the 'General'-tab is that on the general tab the subtotal of all of the items in the cart is compared. Discount on cart with excluded products (PRO) This option is only visible if the discount type is Cart Discount or Cart % Discount. By default, When the coupon is setup as a 'Cart Discount' it will never validate a coupon when an excluded product is in the cart (this is how WooCommerce Coupons work). By checking this box the coupon will still validate when an excluded product is in the cart. Useful for cart discounts based on a subtotal of matching products, but having some products or categories excluded.","title":"Additional usage restrictions"},{"location":"usage-restrictions/#additional-usage-restrictions","text":"Several features are added to the Usage Restriction -tab of the coupon edit page. Here extra rules can be configured that work in combination with the Products, Exclude products, Product categories and Exclude categories rules.","title":"Additional usage restrictions"},{"location":"usage-restrictions/#and-products-not-or","text":"By default a coupon validates if only one of the selected products is in the cart. Check this box if ALL of the products entered on the Usage Restriction -tab must be in the cart to validate the coupon. The word 'OR' or 'AND' is displayed next to the 'Products'-field on the Usage Restriction -tab for clarification.","title":"AND Products (not OR)"},{"location":"usage-restrictions/#and-categories-not-or","text":"By default a coupon validates if a product from any of the selected categories is in the cart. Check this box if products from ALL of the categories entered on the Usage Restriction -tab must be in the cart to validate the coupon. The word 'OR' or 'AND' is displayed next to the Products -field on the Usage Restriction -tab for clarification.","title":"AND Categories (not OR)"},{"location":"usage-restrictions/#minimummaximum-quantity-of-matching-products","text":"The coupon will only validate if the number of products matching the product or category restrictions (on the Usage Restriction -tab in the cart is within this range. If no product or category restriction is entered, the total quantity of all of the products in the cart will be used.","title":"Minimum/maximum quantity of matching products"},{"location":"usage-restrictions/#minimummaximum-subtotal-of-matching-products","text":"The coupon will only validate if the total value of the products matching the product or category restrictions (on the Usage Restriction -tab in the cart is within this range. If no product or category restriction is entered, the total value of all of the products in the cart will be used. Please note: The difference between this option and the 'minimum/maximum spend' on the 'General'-tab is that on the general tab the subtotal of all of the items in the cart is compared.","title":"Minimum/maximum subtotal of matching products"},{"location":"usage-restrictions/#discount-on-cart-with-excluded-products-pro","text":"This option is only visible if the discount type is Cart Discount or Cart % Discount. By default, When the coupon is setup as a 'Cart Discount' it will never validate a coupon when an excluded product is in the cart (this is how WooCommerce Coupons work). By checking this box the coupon will still validate when an excluded product is in the cart. Useful for cart discounts based on a subtotal of matching products, but having some products or categories excluded.","title":"Discount on cart with excluded products (PRO)"}]}