Pay for Payment for WooCommerce 3.0.3 has 3 actions and 18 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Pay for Payment for WooCommerce fires an action
add_action( 'pay4payment_method_settings_saved', function( $method_id, $data ) {
// Your code runs here.
}, 10, 2 );
// Change a value Pay for Payment for WooCommerce is about to use
add_filter( 'pay4payment_chosen_payment_method', function( $string ) {
// Change $string here.
return $string;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Allow to filter settings before loading them. */ apply_filters( "pay4pay_settings_{$tab}", $settings ); -
/** * Filters the chosen payment method id for the current request. */ apply_filters( 'pay4payment_chosen_payment_method', is_string( $method ) ? $method : '' ); -
/** * Filters whether a fee line on an order is one of the plugin's. */ apply_filters( 'pay4payment_is_plugin_fee_item', $tagged || '' !== $gateway_id, $item, $order ); -
/** * Fires after the settings of a payment method have been saved. */ do_action( 'pay4payment_method_settings_saved', $method_id, $data ); -
/** * Filters whether the off-checkout fee sync runs for an order. */ apply_filters( 'pay4payment_order_fee_sync', true, $order, $gateway_id, $source ); -
/** * Filter the launch-offer coupon code. */ apply_filters( 'pay4payment_upgrade_offer_code', 'UPGRADE50' ); -
/** * Filter the launch-offer discount label. */ apply_filters( 'pay4payment_upgrade_offer_discount', '50%' ); -
/** * Filter the launch upgrade-offer end date (`Y-m-d`). Empty disables it. */ apply_filters( 'pay4payment_upgrade_offer_until', '2026-10-31' ); -
do_action( 'wpml_register_single_string', self::CONTEXT, self::item_title_string_name( $method_id, $index ), $tier['item_title'] ?? '' ); -
apply_filters( 'wpml_translate_single_string', $tier['item_title'], Wpml::CONTEXT, Wpml::item_title_string_name( (string) $gateway->id, $tier_index ) ); -
do_action( 'pay4payment_fs_loaded' ); -
apply_filters( 'wcml_raw_price_amount', $fee ); -
apply_filters( 'woocommerce_order_is_vat_exempt', 'yes' === $order->get_meta( 'is_vat_exempt' ), $order ); -
apply_filters( "woocommerce_pay4pay_{$gateway->id}_amount", $cost, $calculation_base, $gateway, $taxable, $include_taxes, $tax_class, $tier_index ); -
apply_filters( 'woocommerce_pay4pay_apply', $do_apply, $cost, $calculation_base, $gateway, $tier_index ); -
apply_filters( "woocommerce_pay4pay_applyfor_{$gateway->id}", $do_apply, $cost, $calculation_base, $gateway, $tier_index ); -
apply_filters( 'woocommerce_pay4pay_charges_fixed', $tier['charges_fixed'] ?? 0, $gateway, $tier_index ); -
apply_filters( 'woocommerce_pay4pay_charges_maximum', $tier['charges_percentage_maximum'], $gateway, $tier_index ); -
apply_filters( 'woocommerce_pay4pay_charges_minimum', $tier['charges_percentage_minimum'], $gateway, $tier_index ); -
apply_filters( 'woocommerce_pay4pay_charges_percentage', $tier['charges_percentage_value'] ?? 0, $gateway, $tier_index );
Generated from Pay for Payment for WooCommerce's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: