There are several WordPress hooks that developers can use to further enhance the plugin behavior and customize it to their needs. You’ll need deep knowledge of PHP as well as the WordPress and WooCommerce code base.

This page is a work in progress and some hooks might still not be documented.

Email

invoicexpress_woocommerce_email_placeholders

Filter: Add new replacement variables to the email contents.

invoicexpress_woocommerce_{$type}_email_subject
invoicexpress_woocommerce_{$type}_email_heading
invoicexpress_woocommerce_{$type}_email_body

Filter: Manipulate the document emails’ subject, heading, and body.

{$type} can be invoice, simplified_invoice, invoice_receipt, credit_note, quote or proforma.

For error reporting emails type is error and for automatic invoices VAT exemption errors the type is automatic_invoice_exemption.

Arguments:

  • The current text: string $text
  • The order: WC_Order $order_object

invoicexpress_woocommerce_email_headers

Filter: Manipulate the document emails’ header.

Arguments:

  • The current headers: array $headers
  • The order: WC_Order $order_object
  • The document type: string $type

Usage example: here.

Documents issuing details

invoicexpress_woocommerce_document_client_name

Filter: Manipulate the client name used for the document.

Arguments:

  • The current name: string $client_name
  • The order: WC_Order $order_object
  • The default entity: string $entity (“company” or “customer”)

invoicexpress_woocommerce_{$type}_validity

Filter: Manipulate the number of days a document remains valid or is due to be paid.

{$type} can be invoice, simplified_invoice, invoice_receipt, credit_note, quote, proforma, transport_guide or devolution_guide.

Arguments:

  • The current validity: string $validity
  • The order: WC_Order $order_object
  • The default entity: string $entity (“company” or “customer”)

invoicexpress_woocommerce_{$type}_data

Filter: Manipulate the full document array that is sent to the InvoiceXpress API.

{$type} can be invoice, simplified_invoice, invoice_receipt, credit_note, quote, proforma, transport_guide or devolution_guide.

Arguments:

  • The current data: string $document_data
  • The order: WC_Order $order_object

(Still) undocumented hooks

These are hooks that we still hadn’t the time to document.

  • Action: invoicexpress_woocommerce_error
  • Action: invoicexpress_woocommerce_debug
  • Filter: invoicexpress_woocommerce_bulk_invoice_data
  • Filter: invoicexpress_woocommerce_add_vat_to_email
  • Filter: invoicexpress_woocommerce_settings_tabs
  • Filter: invoicexpress_woocommerce_registered_{$tab}_settings
  • Action: invoicexpress_woocommerce_after_document_issue
  • Action: invoicexpress_woocommerce_before_document_email
  • Action: invoicexpress_woocommerce_after_document_finish
  • Filter: invoicexpress_woocommerce_automatic_invoice_possible_status
  • Filter: invoicexpress_woocommerce_automatic_invoice_not_recommended_status
  • Filter: invoicexpress_woocommerce_checkout_disable_aelia_field_feedback
  • Filter: invoicexpress_woocommerce_document_language
  • Filter: invoicexpress_woocommerce_new_client_code
  • Filter: invoicexpress_woocommerce_document_filename
  • Filter: invoicexpress_woocommerce_prevent_document_issuing
  • Filter: invoicexpress_woocommerce_allowed_coupon_types
  • Filter: invoicexpress_woocommerce_document_item_title
  • Filter: invoicexpress_woocommerce_document_item_title_with_meta
  • Filter: invoicexpress_woocommerce_document_item
  • Filter: invoicexpress_woocommerce_document_item_unit
  • Filter: invoicexpress_woocommerce_document_shipping
  • Filter: invoicexpress_woocommerce_document_shipping_unit
  • Filter: invoicexpress_woocommerce_document_fee
  • Filter: invoicexpress_woocommerce_document_fee_unit
  • Action: invoicexpress_woocommerce_partial_exemption_applied
  • Filter: invoicexpress_woocommerce_partial_exemption_reason
  • Filter: invoicexpress_woocommerce_automatic_invoice_exemption_email_subject
  • Filter: invoicexpress_woocommerce_automatic_invoice_exemption_email_heading
  • Filter: invoicexpress_woocommerce_automatic_invoice_exemption_email_body
  • Filter: invoicexpress_woocommerce_delay_automatic_invoice
  • Filter: invoicexpress_woocommerce_delay_automatic_invoice_time
  • Filter: invoicexpress_woocommerce_delay_automatic_guide
  • Filter: invoicexpress_woocommerce_delay_automatic_guide_time
  • Action: invoicexpress_woocommerce_error
  • Action: invoicexpress_woocommerce_debug
  • Filter: invoicexpress_woocommerce_get_pdf_timeout
  • Action: invoicexpress_woocommerce_before_email_body
  • Action: invoicexpress_woocommerce_after_email_body
  • Filter: invoicexpress_woocommerce_hybrid_email_css