EECO_GIFT_CARDS_DB_VERSION
public
mixed
EECO_GIFT_CARDS_DB_VERSION
= '2'
WooCommerce Gift Cards
public
mixed
EECO_GIFT_CARDS_DB_VERSION
= '2'
public
mixed
EECO_GIFT_CARDS_PATH
= untrailingslashit(plugin_dir_path(__FILE__))
public
mixed
EECO_GIFT_CARDS_ROOT
= plugin_dir_path(__FILE__)
public
mixed
EECO_GIFT_CARDS_VERSION
= '1.3.4'
check for plugin dependencies and deactivate plugin if they don't exist
activate_eeco_gift_cards() : mixed
deactivate plugin
deactivate_eeco_gift_cards() : mixed
init plugin functionalities
init_eeco_gift_cards() : mixed
Resend the gift card to customer
resend_email() : mixed
Import gift cards via csv-file
eeco_gift_cards_csv_import() : mixed
gets the given template and includes it
eeco_gift_cards_get_template(mixed $template[, array<string|int, mixed> $args = array() ]) : mixed
Arguments to pass to the template
Function creates a gift card pdf file from order, giftcard and settings objects.
create_gift_card_pdf(object $order, mixed $gift_card) : string
Gift card pdf files will be uploaded to wp upload directory /giftcard folder.
Order data
Where gift card pdf was created.
Render gift card on settings page for preview
eeco_gift_cards_render(string $type) : string
The git card type
Download PDF of the example gift card
eeco_gift_cards_download_preview_pdf(string $type) : mixed
The gift card type
Generate gift card html using handlebars
eeco_gift_cards_render_template(array<string|int, mixed> $card, mixed $type) : string
The card content
fetches the gift cards for given order can be filtered by gift card type
get_eeco_gift_cards_for_order(int $order_id[, string|array<string|int, mixed> $types = array('offline_gift_card', 'online_gift_card') ]) : array<string|int, mixed>
The order id
Gift card types
Queried posts
get the post for single giftcard
eeco_get_gift_card_post(string $code) : WP_Post|bool
The code
get a single gift card
eeco_get_gift_card(string $code) : Eeco_Gift_Card|bool
The gift card code
add gift card transaction
eeco_gift_cards_create_transaction(int $order_id, int $gift_card_id, string $validator, float $amount, float $tax) : bool
Id of the order
Id of the gift card
Validator value
Amount used in the transaction
Taxes
get gift cards tempalate root
eeco_gif_cards_template_root(string $template[, string $dir = 'partials' ]) : string
The template
The directory
Template root
format the given date
eeco_gift_cards_format_date(string $date[, string $old = '.' ][, string $new = '-' ][, string $format = 'Y-m-d' ]) : mixed
The date to format
The old date separator
The new date separator
The new format
generates the end date for gift card validity
eeco_gift_cards_create_exipration_date(WC_Order_Item_Product $item, WC_Product $product) : string
Order item
Product
expiration date
Download and delete file from the server
eeco_gift_cards_download_file(string $url, string $path[, bool $delete = true ]) : mixed
File url
File path
Delete file after download
Format a price using woocommerce wp and woocommerce options
eeco_gift_cards_format_price(float $amount[, bool $currency = true ]) : string
The price to format
Whether to add currency symbol
Formatted price
Create attachments for the gift card email
eeco_gift_cards_attachments(mixed $order_id) : mixed
Set email classes for gift cards
eeco_gift_cards_register_emails(array<string|int, mixed> $emails) : mixed
Array of email classes
alter gift cards query when querying by post id
eeco_gift_cards_query(WP_Query $query) : void
The query object
prefix the gift card code if it has been set
eeco_gift_cards_add_prefix(mixed $code) : string
The code to prefix
Gift card code
toggle gift card active status
eeco_gift_cards_toggle_status() : mixed
deliver the scheduled gift card
eeco_gift_cards_deliver_gift_card(int $order_id, int $gift_card_id) : mixed
The order id
The gift card id
add email actions
eeco_gift_cards_email_actions(array<string|int, mixed> $actions) : array<string|int, mixed>
The current actions
Email actions
Check for expired gift cards and update their status
eeco_gift_cards_check_for_expired() : mixed