[WordPress] 外掛分享: VoucherPress

首頁外掛目錄 › VoucherPress
200+
安裝啟用
★★★☆☆
3.3/5 分(17 則評價)
3692 天前
最後更新
問題解決
WordPress 2.8+ v1.5.7 上架:2010-02-10

內容簡介

感謝您使用 VoucherPress。看到這麼多人創建各種業務的優惠券,從披薩店到珠寶商,從清潔公司到體育俱樂部 - 您已經創建了數千個優惠券。我真的很自豪可以創建一些對許多人有用的東西。

當我在開發 VoucherPress 的下一版時,如果您能填寫這份簡短的調查,將會非常有幫助。謝謝您的時間。

您是否曾想在您的網站上提供優惠券、門票、優惠券或令牌?如果是,這個外掛就是為您而設的。您可以創建任何您想要的文字的優惠券,從各種模板中選擇版面設計和字體(您也可以添加自己的模板)。然後指定 URL,這些優惠券就可以被查看、下載和打印。

有簡碼可以添加連結到特定的優惠券,以顯示所有優惠券的無序列表,或顯示註冊表以請求限制的優惠券。

您可以要求訪問者提供他們的姓名和電子郵件地址以獲得優惠券。如果需要電子郵件地址,系統將向其發送一封電子郵件並包含指向優惠券 URL 的鏈接。每個優惠券都有一個唯一的代碼,與電子郵件地址相關聯的優惠券只能使用一次,因此一旦下載需要註冊的優惠券,它就無法再次下載。

挂鈎

從1.1.2版本開始,該外掛還提供了一些挂鈎供您使用以運行自己的自定義代碼。這些挂鈎如下:

voucherpress_create

當創建優惠券時,此挂鈎將返回優惠券的屬性。您可以像這樣使用它:

add_action( 'voucherpress_create', 'my_voucherpress_create_function' );
function my_voucherpress_create_function( $id, $name, $text, $description, $template, $require_email, $limit, $startdate, $expiry ) {
// 在這里進行操作...
}

voucherpress_edit

當編輯優惠券時,此挂鈎將返回優惠券的屬性。您可以像這樣使用它:

add_action( 'voucherpress_edit', 'my_voucherpress_edit_function' );
function my_voucherpress_edit_function( $id, $name, $text, $description, $template, $require_email, $limit, $startdate, $expiry ) {
// 在這里進行操作...
}

voucherpress_register

當有人註冊以下載優惠券並向他們發送電子郵件時,此挂鈎將返回優惠券和用戶的詳細信息。您可以像這樣使用它:

add_action( 'voucherpress_register', 'my_voucherpress_register_function' );
function my_voucherpress_register_function( $voucher_id, $voucher_name, $user_email, $user_name ) {
// 在這里進行操作...
}

voucherpress_download

當有人下載優惠券時,此挂鈎將返回優惠券和用戶的詳細信息。您可以像這樣使用它:

add_action( 'voucherpress_download', 'my_voucherpress_download_function' );
function my_voucherpress_download_function( $voucher_id, $voucher_name, $code ) {
// 在這里進行操作...
}

該外掛還使用__()函數,以實現易於翻譯。

感謝 Christian Serron (http://twitter.com/cserron) 提供讓優惠券在小工具中運行的代碼(目前停用,我正在修復此問題),以及 Barry (http://www.betakeygiveaway.com/) 超乎職責的 bug 測試。

簡碼

有四個可用的簡碼。第一個簡碼顯示鏈接到特定的優惠券,並且...(未完待續)

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.5.7) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「VoucherPress」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Thanks for using VoucherPress. It’s great to see so many people creating vouchers for all kinds of business. From pizza joints to jewellers, cleaning companies to sports clubs – you’ve created thousands of vouchers, and I’m really proud to have created something which has been useful to so many people.
As I work on the next version of VoucherPress it would be really helpful if you could fill in this short survey. Many thanks for your time.
Have you ever wanted to give away vouchers, tickets, coupons or tokens on your website? If so this plugin is for you. You can create a voucher with whatever text you want, choosing the layout and font from a range of templates (you can also add your own templates). Vouchers can then be viewed, downloaded and printed from a specified URL.
There are shortcodes to add a link to a particular voucher, to show an unordered list of all your vouchers, or to show the registration for to request a restricted voucher.
You can require visitors to provide their name and email address to get a voucher. If an email address is required an email is sent to the address with a link to the voucher URL. Each voucher has a unique code, and vouchers that have an email address associated with them can only be used once, so once a registration-required voucher is downloaded it can’t be downloaded again.
Hooks
From version 1.1.2 the plugin also offers a selection of hooks which you can use to run your own custom code. The hooks are:
voucherpress_create
When a voucher is created, this hook returns the properties of the voucher. You can use it like this:
add_action( ‘voucherpress_create’, ‘my_voucherpress_create_function’ );
function my_voucherpress_create_function( $id, $name, $text, $description, $template, $require_email, $limit, $startdate, $expiry ) {
// do something here…
}
voucherpress_edit
When a voucher is edited, this hook returns the properties of the voucher. You can use it like this:
add_action( ‘voucherpress_edit’, ‘my_voucherpress_edit_function’ );
function my_voucherpress_edit_function( $id, $name, $text, $description, $template, $require_email, $limit, $startdate, $expiry ) {
// do something here…
}
voucherpress_register
When someone registers to download a voucher and an email is sent to them, this hook returns the voucher and the users details. You can use it like this:
add_action( ‘voucherpress_register’, ‘my_voucherpress_register_function’ );
function my_voucherpress_register_function( $voucher_id, $voucher_name, $user_email, $user_name ) {
// do something here…
}
voucherpress_download
When someone downloads a voucher, this hook returns the voucher and the users details. You can use it like this:
add_action( ‘voucherpress_download’, ‘my_voucherpress_download_function’ );
function my_voucherpress_download_function( $voucher_id, $voucher_name, $code ) {
// do something here…
}
The plugin also makes use of the __() function to allow for easy translation.
Thanks to Christian Serron (http://twitter.com/cserron) for the code to make the vouchers work in widgets (currently disabled, I’m working on this) and to Barry (http://www.betakeygiveaway.com/) for bug testing above and beyond the call of duty.
Shortcodes
There are four shortcodes available. The first shows a link to a particular voucher, and is in the format:
[voucher id=”123″]
The “id” parameter is the unique ID of the voucher. The correct ID to use is available in the screen where you edit the voucher.
You can also how the description after the link:
[voucher id=”123″ description=”true”]
The second shows a link to a voucher, but with a preview of the voucher (just the background image, no text) and the voucher name as the image alternate text:
[voucher id=”123″ preview=”true”]
And you can show the description after the preview as well:
[voucher id=”123″ preview=”true” description=”true”]
You can also show an unordered list of all your live vouchers using this shortcode:
[voucherlist]
And a list of all live vouchers with their descriptions:
[voucherlist description=”true”]
And you can also show the form for people to enter their name and email address if they wish to register for a restricted voucher:
[voucherform id=”123″]
The shortcodes for any voucher can be found on the edit screen for that voucher. Just click the ‘Shortcodes’ button.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon