| 开发者 |
webdados
ptwooplugins nakedcatplugins |
|---|---|
| 更新时间 | 2026年4月3日 17:10 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.2 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv3 |
| 版权网址: | 版权信息 |
tdw_rule_add, tdw_rule_edit, and tdw_rule_delete actions when adding, editing, and deleting rules, to do whatever you want, like, for example, clearing cache (check out to use them here and send us cool examples of what you’ve done)Plugins menu in WordPressProducts, Taxonomy Discounts to set it upYes. Discounts are applied automatically at cart/checkout based on the product’s taxonomy terms and the customer’s user role — no coupon code is required.
Yes. You can set a minimum quantity per rule, enabling bulk or tiered pricing for product categories, tags, or any other taxonomy. Keep in mind the quantity is per individual product in the cart, not all products from the same taxonomy.
Yes. By combining taxonomy rules with WordPress user roles (e.g., a “Wholesale” role), you can create role-based or wholesale pricing rules.
We can only show the “sale” badge when we are sure the product will get a discount, no matter how many you buy. The badge is shown only for percentage-based rules with no minimum quantity required.
This only works for percentage discounts with a minimum quantity of 0 or 1, and you need to add this to your (child-)theme functions.php file:
add_filter( 'tdw_perc_sale_badge', '__return_true' );
Or you can use the PRO add-on
You need to use the following filters:
tdw_loop_disc_info_action and tdw_loop_disc_info_prio: to set the hook and priority for the loop page and return, for example, woocommerce_after_shop_loop_item_title and 1tdw_single_disc_info_action and tdw_single_disc_info_prio: to set the hook and priority for the product page and return, for example, woocommerce_single_product_summary and 6
(This is for Storefront. You may have to tweak the action and priority to match your theme better.)You can use the wctd_get_product_current_price helper function with the product or variation object or ID as the first argument.
You can also pass the quantity as the second argument to calculate percentage discounts with a minimum quantity greater than 1, or “buy x get y free” discounts. The returned price will be the unit price.
This is still beta.
No. The way we store cart item prices is not currently compatible with stores that allow customers to change currency during the shopping session.
Yes.
Yes.
This is a free plugin. It’s our way of giving back to the wonderful WordPress community. Only customers of the PRO add-on get included limited technical support. There’s a support tab at the top of this page, where you can ask the community for help. We’ll try to keep an eye on the forums, but we cannot promise to answer support tickets. If you reach us by email or any other direct contact method, we’ll assume you need premium, paid-for support.
Yes, on the GitHub repository.
Sure. Go to GlotPress and help us out.
You can report any security bugs found in the source code of this plugin through the Patchstack Vulnerability Disclosure Program. The Patchstack team will assist you with verification, CVE assignment and take care of notifying the developers of this plugin.
tdw_form_add_data_before_save and tdw_form_edit_data_before_save filters to allow the PRO Add-on or 3rd Party developers to manipulate the rule data before it is saved to term metaload_plugin_textdomain call as it’s no longer neededwoocommerce_get_variation_sale_price to return the discounted priceprintf with sprintf in several strings to fix incorrect output$product->has_child() instead of $product->is_type(‘variable’) so that all kinds of variable products declared from other plugins are compatibletdw_cart_item_subtotal_informationwoocommerce_product_get_price filterwoocommerce_product_is_on_sale and woocommerce_product_get_price - This can be disabled by passing false to the newtdw_enable_cache` filter or on the PRO add-on$location to the tdw_text_x_discount, tdw_text_from_x_bought_y_discount and tdw_text_for_each_x_bought_y_free filtersstrong tags and replace them with unopinated span tags with classes on discount information (via filters or PRO add-on)$location to the tdw_text_x_discount, tdw_text_from_x_bought_y_discount and tdw_text_for_each_x_bought_y_free filtersWCTD_PERC_SALE_BADGE, WCTD_LOOP_DISC_INFO_ACTION, WCTD_LOOP_DISC_INFO_PRIO, WCTD_PROD_DISC_INFO_ACTION, WCTD_PROD_DISC_INFO_PRIO and WCTD_ADVANCED_MODE in favor of the new filters tdw_perc_sale_badge, tdw_loop_disc_info_action, tdw_loop_disc_info_prio, tdw_single_disc_info_action, tdw_single_disc_info_prio and tdw_dev_modeWCTD_ADVANCED_MODE constant is set to true, a new “ID” field will be available for discount rules, which can be used by developers to identify a specific discount rulewctd_get_product_applied_rule helper function to get the product applied rule, if anytdw_custom_product_loop that you should return true to inside your product custom loops so that the discounted price shows correctly (Thanks vinha.pt)tdw_rule_add, tdw_rule_edit and tdw_rule_delete actions when adding, editing or deleting rules (by @onlylowercaselettersandnumbers suggestion)wctd_get_product_current_price helper function that developers can use to get the current product or variation price with the discount appliedWC tested up to tagWCTD_PERC_SALE_BADGE constant to true, the sale badge will be replaced by the discount percentage, if the minimum quantity is 0 or 1WCTD_GET_PRICE_FILTER_PRIO constant, that priority will be used on the woocommerce_product_get_price filterWC tested up to tagadd_woocommerce_term_meta and update_woocommerce_term_meta instead of add_term_meta and update_term_metaWC tested up to tagRequires at least tagWC tested up to tagWCTD_ENABLE_TIME constant)Tested up to tagWCTD_ENABLE_TIME as true on your wp-config.php file for this feature to be enabled);languages folder (the translations are now managed on WordPress.org’s GlotPress tool and will be automatically downloaded from there)WC tested up to tag on the plugin main fileTested up to tagTested up to tagTested up to tagTested up to tagwctd_get_product_ids_on_sale function to get the product_id of all the products that have an active discount, similar to WooCommerce’s native wc_get_product_ids_on_sale (to be used by developers);