
內容簡介
Coupon Counter for Easy Digital Downloads (EDD) 是一個簡單但實用的外掛,可以讓您動態地顯示剩餘或已使用的優惠券代碼數量。
顯示以下訊息:
只剩下 128 張優惠券!
已使用 34/200 張折扣代碼!
短碼
使用下面的短碼輕鬆地顯示剩餘和已使用優惠券代碼的數量。
[cc-edd id="discount-id" format="countdown/count"]
範例
只剩下 [cc-edd id="293" format="countdown"] 張優惠券!
會顯示:只剩下 xxx 張優惠券!
[cc-edd id="293" format="count"] 張折扣代碼已使用!
會顯示:xx/xxx 張折扣代碼已使用!
進階
在「計數」顯示格式中可使用過濾器更改分隔符號。
例如,可以將「/」分隔符號更改為「of」。
function prefix_custom_cc_edd_divider() {
return ' of ';
}
add_filter( 'cc_edd_divider', 'prefix_custom_cc_edd_divider' );
使用上述範例,結果為:
xx of xxx 張折扣代碼已使用!
外掛標籤
開發者團隊
原文外掛簡介
Coupon Counter for Easy Digital Downloads (EDD) is a simple but useful plugin that allows you to dynamically display the remaining or used coupon codes.
Display messages like:
Only 128 coupons remaining!
34/200 discount codes used!
Shortcode
Easily display the count of remaining and used coupon codes using the shortcode below.
[cc-edd id="discount-id" format="countdown/count"]
Examples
Only [cc-edd id="293" format="countdown"] coupons left!
Will result in: Only xxx coupons left!
[cc-edd id="293" format="count"] discount codes used!
Will result in: xx/xxx discount codes used!
Advanced
There is a filter available for the “count” display format that allows you to change the separator icon as desired.
For example, you can change the “/” separator to “of”.
function prefix_custom_cc_edd_divider() {
return ' of ';
}
add_filter( 'cc_edd_divider', 'prefix_custom_cc_edd_divider' );
Following the example above, this would result in:
xx of xxx discount codes used!
