Developers

Templates, hooks and helper functions to customize BrainlessITC Gift Cards.

Templates

Copy a template from the plugin's templates/ folder to yourtheme/brainlessitc-gift-cards-for-woocommerce/ and edit it there.

TemplateUsed for
single-product/add-to-cart/bitcgc-gift-card.phpPurchase form on the product page
cart/bitcgc-redeem-form.php"Have a gift card?" form (classic cart / checkout)
balance-form.phpBalance checker
emails/bitcgc-gift-card.php, emails/plain/bitcgc-gift-card.phpGift card email
pro/…Pro templates: design picker, PDF, My Account, Pro emails

Actions

Filters

Functions

Data

Gift cards are stored in {prefix}bitcgc_cards, their history in {prefix}bitcgc_transactions. Settings are WooCommerce options named bitcgc_*. Orders keep the cards they used in the order meta _bitcgc_redemptions (and what was actually taken in _bitcgc_debits).