| 开发者 | tlloancy |
|---|---|
| 更新时间 | 2026年11月23日 04:39 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[tlpg_balance] shortcode, or in My Account → Gift cards.SHOP-ABCD-2345-WXYZ.[tlpg_balance] to a page so customers can check their balance.No. The customer enters the gift card code in the normal coupon field. That works in the classic checkout and in the checkout block, with no extra step.
In "Prepaid balance" mode, yes: the card pays the whole order, shipping and taxes included. In "Discount" mode, a card is applied as a discount on the products, as a coupon is, so shipping is not covered.
No. Gift card products are excluded from what a card can pay for.
Open WooCommerce → Gift cards → Settings → Gift card redemption.
It depends on the voucher and on your country, so ask your accountant. In the EU, tax on a single-purpose voucher is generally due when it is sold, and tax on a multi-purpose voucher when it is spent. As a rule of thumb, "Discount" suits the first case, and "Prepaid balance" with the gift card product's tax status set to "None" suits the second. The plugin does not decide this for you.
A card bought on that order is voided if it was not used. A balance that paid for that order goes back on its card. A card the merchant voided by hand stays voided. Moving the order to the trash, or deleting it, does the same; restoring it from the trash takes the balance again. A partial refund does not change a card balance by itself: the order gets a note, and you can use "Adjust" on the card.
No. A balance reserved by an order that stays unpaid for 48 hours is given back. If that order is paid later, the balance is taken again. Change the delay with the tlpg_release_pending_after_hours filter.
Yes. The buyer picks a "send on" date, up to one year ahead. WP-Cron sends the email on that day. Cards waiting to be sent are listed under the "Scheduled" filter.
In two tables of your database (tlpg_cards and tlpg_ledger). They are kept when you delete the plugin unless you tick "Delete all gift cards and history" in the settings.
No. On activation, Tlloancy People's Giftcard imports the cards, the product settings and the code prefix from that earlier plugin.
Put [tlpg_balance] on any page. Logged-in customers also see their cards in My Account → Gift cards. The page that holds the balance checker is marked as not to be cached, because its form carries a security token.
A gift card works like cash, so the full code is shown there only for a card the customer bought on their own account and sent to their own address. Cards sent to the account's email address are listed with the code hidden except for its last four characters; the full code is in the email that delivered it. The billing email is not used to find cards, because customers can type any address in it. To change this, use the tlpg_account_show_full_code filter.
The amount must be at least the smallest unit of your prices (0.01 with two decimals) and cannot have more decimals than your prices, so a card is always worth what it costs. Set a higher minimum on the product. One order can hold up to 100 gift cards; change it with the tlpg_max_cards_per_order filter. A card line that cost nothing is not turned into a card on a store that keeps coupons off gift cards; allow it with the tlpg_issue_unpaid_cards filter.
Failed lookups are counted per visitor and per network. The visitor's address is the connection address; forwarding headers such as X-Forwarded-For are only read when the connection comes from a private address (a proxy of your own server), because visitors can write those headers themselves. If your CDN shows its own public addresses, return the real visitor address with the tlpg_client_ip filter. tlpg_max_failed_lookups changes the limit (10 per 15 minutes).
tlpg_max_cards_per_order), in the product page, the cart and the Cart block.tlpg_client_ip and tlpg_max_failed_lookups).