Yoco Payments 3.9.5 has 8 actions and 14 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 Yoco Payments fires an action
add_action( 'yoco_payment_gateway/payment/completed', function( $order, $payment_id ) {
// Your code runs here.
}, 10, 2 );
// Change a value Yoco Payments is about to use
add_filter( 'yoco_payment_gateway_debug', function( $value ) {
// Change $value here.
return $value;
}, 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
-
/** * Fires an action hook after a Yoco payment has been completed for an order. */ do_action( 'yoco_payment_gateway/payment/completed', $order, $payment_id ); -
do_action( 'yoco_payment_gateway/order/refunded', $order, $body ); -
yoco_payment_gateway_debug
filterapply_filters( 'yoco_payment_gateway_debug', false ); -
apply_filters( 'yoco_payment_gateway/payment/request/headers', $headers ); -
apply_filters( 'yoco_payment_gateway/request/refund/args', $args ); -
woocommerce_gateway_icon
filterapply_filters( 'woocommerce_gateway_icon', $icons, $this->id ); -
woocommerce_gateway_title
filterapply_filters( 'woocommerce_gateway_title', $title, $this->id ); -
apply_filters( 'yoco_gateway_plugin/money/currencies', array( 'ZAR', ) ); -
apply_filters( 'yoco_payment_gateway_admin_notice_prefix', __( 'Yoco Payments', 'yoco-payment-gateway' ) ); -
apply_filters( 'yoco_payment_gateway_form_fields', array() ); -
do_action( 'yoco_payment_gateway/admin/display_notices', $this ); -
do_action( 'yoco_payment_gateway/checkout/created', $order, $response['body'] ); -
apply_filters( 'yoco_payment_gateway/installation/request/body', $body ); -
apply_filters( 'yoco_payment_gateway/installation/request/headers', $headers ); -
do_action( "yoco_payment_gateway/order/meta/{$key}/{$action}", $order->get_id() ); -
apply_filters( 'yoco_payment_gateway/payment/request/body', $body ); -
do_action( 'yoco_payment_gateway/plugin/activated' ); -
do_action( 'yoco_payment_gateway/plugin/compatible' ); -
do_action( 'yoco_payment_gateway/plugin/deactivated' ); -
apply_filters( 'yoco_payment_gateway/refund/request/headers', $headers ); -
apply_filters( 'yoco_payment_gateway/refunds/request/headers', $headers ); -
apply_filters( 'yoco_payment_gateway/telemetry/data', array( 'domain' => $object->getHostUrl(), 'webhooks' => $object->getWebhooks(), 'preferredWebhook' => $object->getPreferredWebhook(), 'installationName' => $object->getSiteName(), 'phpVersion' => $object->getPhpVersion(), 'wordPressVersion' => $object->getWpVersion(), 'wooCommerceVersion' => $object->getWcVersion(), 'yocoPaymentPluginVersion' => $object->getYocoPluginVersion(), 'yocoPaymentPlug... );
Generated from Yoco Payments's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: