Purchase_Receipt implements Registerable, Service

Adds VAT information to the purchase receipt [edd_receipt] shortcode.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Registerable
Service

Table of Contents

add_vat_addresses()  : string
Filter the shortcode output to add the addresses at the end
add_vat_note()  : mixed
Add VAT note right after table
maybe_parse_country_code()  : string
When the "EU" option is selected under the "Country" dropdown in Downloads → Settings → Extensions → EU VAT - fallback to the EDD Store country code setting.
register()  : mixed
{@inheritdoc}

Methods

add_vat_addresses()

Filter the shortcode output to add the addresses at the end

public add_vat_addresses(string $output, string $tag) : string
Parameters
$output : string
$tag : string
Return values
string

add_vat_note()

Add VAT note right after table

public add_vat_note(WP_Post $payment) : mixed
Parameters
$payment : WP_Post
Return values
mixed

maybe_parse_country_code()

When the "EU" option is selected under the "Country" dropdown in Downloads → Settings → Extensions → EU VAT - fallback to the EDD Store country code setting.

public maybe_parse_country_code(string $code) : string

The "EU" country code is a special code used to validate VAT details from the VIES api, however when using this code some address details (like invoices) will display "EU Moss Number" as country.

For this reason we fallback to the store's country code.

Parameters
$code : string
Return values
string

register()

{@inheritdoc}

public register() : mixed
Return values
mixed

Search results