开发者 |
webdados
ptwooplugins nakedcatplugins |
---|---|
更新时间 | 2025年6月14日 18:10 |
PHP版本: | 7.2 及以上 |
WordPress版本: | 6.9 |
版权: | GPLv3 |
版权网址: | 版权信息 |
mcoupon
by default) and it will be stored in a cookie for a configurable amount of time.
While the cookie is valid:
mcoupon
to something else?Yes. Use the magic_coupon_url_parameter
filter.
Sure you can. Use the magic_coupon_html_message_action_hook
filter to change the hook and the magic_coupon_html_message_action_priority
filter to change the priority.
If you don’t know what we’re talking about, you should probably stop now and hire us to do it for you :-)
You can also show it directly on the product description by using the [magic_coupon_html_message]
shortcode.
You bet! Use one of the following placeholders on your message:
{product_id}
will be replaced by the Product ID;{coupon}
will be replaced by the coupon code;{cookie_expire_timestamp}
will be replaced by the cookie expiration Unix timestamp;{cookie_validity_minutes}
will be replaced by the cookie validity in minutes;{cookie_validity_hours_minutes}
will be replaced by the cookie validity in hours or minutes (in the x hours
or x minutes
format), depending on the validity being more or less than one hour;magic_coupon_html_message_replace_tags
filter. See an example here.
And because you can also use shortcodes on the HTML message field, you can feed the product id, coupon, the cookie expire timestamp or validity, or any other variable you set via your own placeholders as a shortcode argument, you can do whatever you want with your custom message. Go crazy, or hire us to develop a custom solution for you.
Yes. The page output has to be changed to set the discounted product prices based on the user cookie. That’s incompatible with a server-side caching system. We set the following constants to prevent caching by some plugins, on the moment the customer reaches the page with a coupon code:
DONOTCACHEPAGE
DONOTCACHEOBJECT
DONOTCACHEDB
mcoupon
by default), and we had good results. Regular users see the cached page and the ones with the coupon set on the cookie see non-cached pages.
Yes.
Yes.
This is a free plugin. It’s our way of giving back to the wonderful WordPress community. There’s a support tab on 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 means, we’ll assume you need, premium, and of course, paid-for support.
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.
{cookie_validity_hours_minutes}
placeholder on the HTML message that will show the cookie validity time in hours or minutes;[magic_coupon_html_message]
shortcode to show the HTML message on the product description if the theme is custom and does not call the woocommerce_single_product_summary
action