Advanced Configuration
This section outlines the advanced configuration options related to the Cash App Afterpay WooCommerce integration and site-specific customisation.
The Cash App 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 Cash App Afterpay plugin runs a series of checks to determine whether Cash App Afterpay should be an available payment option for each individual product. Third-party plugins can exclude Cash App Afterpay from products that would otherwise be considered supported. To fix the exclusion problem, attach 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. Cash App 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 Cash App Afterpay WooCommerce integration.
Cash App Afterpay Product Logo
This is provided for rendering an advanced img tag to display the Cash App 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 Cash App Afterpay logo:
Cash App 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:
