eeco_logo_svg Created with Sketch.

WooCommerce Gift Cards

Eeco_Gift_Cards_My_Account
in package

Table of Contents

__construct()  : mixed
bind actions
menu_items()  : array<string|int, mixed>
Add the gift cards page to woocommerce my account menu items
query_vars()  : array<string|int, mixed>
Add gift cards page to to woocommerce query vars
template()  : mixed
Load the gift cards page template
title()  : string
Set the gift cards page title
endpoints()  : mixed
Add the gift cards page to as a rewrite endpoint
get_gift_cards()  : array<string|int, mixed>
Get the current users gift cards

Methods

menu_items()

Add the gift cards page to woocommerce my account menu items

public menu_items(array<string|int, mixed> $items) : array<string|int, mixed>
Parameters
$items : array<string|int, mixed>

Current menu items

Return values
array<string|int, mixed>

Filtered menu items

query_vars()

Add gift cards page to to woocommerce query vars

public query_vars(array<string|int, mixed> $vars) : array<string|int, mixed>
Parameters
$vars : array<string|int, mixed>

The current query vars

Return values
array<string|int, mixed>

Filtered query vars

title()

Set the gift cards page title

public title(string $title) : string
Parameters
$title : string

The page title

Return values
string

Filtered title

endpoints()

Add the gift cards page to as a rewrite endpoint

private endpoints() : mixed
Return values
mixed

get_gift_cards()

Get the current users gift cards

private get_gift_cards([string $type = 'online_gift_card' ]) : array<string|int, mixed>
Parameters
$type : string = 'online_gift_card'

The gift card type to query

Return values
array<string|int, mixed>

Array of gift cards


        

Search results