Advanced Configuration
This section outlines the advanced configuration options related to the Afterpay WooCommerce integration and site-specific customisation.
The Afterpay Gateway for WooCommerce plugin is available for extension or customisation, without alterations to the plugin code.
This allows for a greater level of compatibility with future updates.
Advanced Configuration is divided into the following sections:
Hooks
Product Eligibility
The Afterpay plugin runs a series of checks to determine whether Afterpay should be an available payment option for each individual product. Third-party plugins can exclude Afterpay from products that would otherwise be considered supported. This can be done by attaching to the following filter hook:
afterpay_is_product_supported
Example
Customising Hooks & Priorities
Various WooCommerce hooks are assumed to be implemented by the active WordPress theme. Afterpay methods can be detached from their default hooks and reattached to different hooks, or to the same hooks with different priorities.
Since version 2.1.0, hooks and priorities can be customised from within the plugin settings page.

Shortcodes
This section outlines the shortcodes utilised by the Afterpay WooCommerce integration.
Afterpay Product Logo
This is provided for rendering an advanced img tag for displaying the Afterpay logo on individual product pages. The img tag uses the srcset attribute to include 3 different resolutions of the logo for screens with varying pixel density ratios.
There are 3 different versions of the logo to chose from:
colourblackwhite
The default theme is colour. This can be overridden by including a theme attribute inside the shortcode. For example, if you have a dark themed website and wish to use the white mono version of the Afterpay logo:
Afterpay Product Messaging
To use the shortcode on product pages, please make sure the Payment Info on Individual Product Pages has been enabled. Edit the text content as appropriate. Optionally, clear the hook name if you would like to disable the default behaviour of rendering the content when the hook is triggered. Instead, the content will then only render wherever the shortcode is added.

Then paste [afterpay_paragraph] into the product description, or into a content area using your page builder.


To use the shortcode on custom pages, provide a product ID in the shortcode:
