EDD_Invoices implements Registerable, Service
Integrates the plugin with the EDD Invoices plugin.
Tags
Interfaces, Classes and Traits
- Registerable
- Service
Table of Contents
- $company : Company_VAT
- Holds our company details.
- add_additional_info() : void
- Add additional information to invoice table.
- add_company_details() : void
- Add website url and email address to the "invoices from" column.
- add_customer_vat() : void
- Add customer vat details inside the invoice details.
- additional_info() : void
- Outputs the additional info section for the invoice.
- disable_default_templates() : void
- Disable the original EDD Invoices templates actions.
- get_company_address() : string
- Return our company address within the invoice instead of the original value.
- get_company_name() : string
- Return our company name within the invoice instead of the original value.
- get_company_vat() : string
- Return our company vat number within the invoice instead of the original value.
- invoice_contacts() : void
- Outputs the storefront and customer contact information.
- register() : mixed
- {@inheritdoc}
- register_template_stack() : array<string|int, mixed>
- Adds our custom templates directory to the stack.
Properties
$company
Holds our company details.
protected
Company_VAT
$company
Methods
add_additional_info()
Add additional information to invoice table.
public
add_additional_info(object $order) : void
Parameters
- $order : object
Return values
void —add_company_details()
Add website url and email address to the "invoices from" column.
public
add_company_details(object $order) : void
Parameters
- $order : object
Return values
void —add_customer_vat()
Add customer vat details inside the invoice details.
public
add_customer_vat(object $order) : void
Parameters
- $order : object
Return values
void —additional_info()
Outputs the additional info section for the invoice.
public
additional_info(Order|EDD_Payment $order) : void
Parameters
- $order : Order|EDD_Payment
-
The order/payment object.
Return values
void —disable_default_templates()
Disable the original EDD Invoices templates actions.
public
disable_default_templates() : void
Return values
void —get_company_address()
Return our company address within the invoice instead of the original value.
public
get_company_address(string $value) : string
Parameters
- $value : string
Return values
string —get_company_name()
Return our company name within the invoice instead of the original value.
public
get_company_name(string $value, string $key, mixed $default) : string
Parameters
- $value : string
- $key : string
- $default : mixed
Return values
string —get_company_vat()
Return our company vat number within the invoice instead of the original value.
public
get_company_vat(string $value) : string
Parameters
- $value : string
Return values
string —invoice_contacts()
Outputs the storefront and customer contact information.
public
invoice_contacts(Order|EDD_Payment $order) : void
Parameters
- $order : Order|EDD_Payment
-
The order/payment object.
Tags
Return values
void —register()
{@inheritdoc}
public
register() : mixed
Return values
mixed —register_template_stack()
Adds our custom templates directory to the stack.
public
register_template_stack(array<string|int, mixed> $paths) : array<string|int, mixed>
Priority is set to 59 so that it's detected before the EDD Invoices stack.
Parameters
- $paths : array<string|int, mixed>
-
Array of template directories.