\dtg\gift_aid_for_woocommerceOrders

Class Orders

Order related functionality.

Summary

Methods
Properties
Constants
__construct()
run()
add_orders_column()
add_column_data()
add_order_details()
add_order_email_meta()
update_order_meta()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$plugin_root
$plugin_name
$plugin_prefix
N/A

Properties

$plugin_root

$plugin_root : string

Path to the root plugin file.

Type

string

$plugin_name

$plugin_name : string

Plugin name.

Type

string

$plugin_prefix

$plugin_prefix : string

Plugin prefix.

Type

string

Methods

__construct()

__construct() 

Constructor.

run()

run() 

Unleash Hell.

add_orders_column()

add_orders_column(array  $columns) 

Add a Gift Aid column to the order screen.

Parameters

array $columns

An array of column names.

add_column_data()

add_column_data(string  $column) 

Populate the Gift Aid column with the post meta.

Parameters

string $column

Column name.

add_order_details()

add_order_details(object  $order) 

Add the Gift Aid status for each order on the shop orders screen.

Parameters

object $order

Current order object.

add_order_email_meta()

add_order_email_meta(object  $order, boolean  $sent_to_admin, boolean  $plain_text) 

Add the Gift Aid meta to order emails.

Parameters

object $order

The order object.

boolean $sent_to_admin

Whether the email is for the admin.

boolean $plain_text

Whether the email is plain text.

update_order_meta()

update_order_meta(object  $order_id) 

Update order post meta if the donor has chosen to reclaim Gift Aid.

Parameters

object $order_id

The order ID.