Yoco Payments icon
Payments & Donations

Yoco Payments hooks reference

  • By yocoadmin
  • v3.9.5
  • Updated

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.

functions.phpyour child theme
// 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

  • src/Gateway/PaymentStatusScheduler.php line 429 · used in 2 places
    /**
     * Fires an action hook after a Yoco payment has been completed for an order.
     */
    do_action( 'yoco_payment_gateway/payment/completed', $order, $payment_id );
  • src/Gateway/Processors/RefundProcessor.php line 47 · used in 7 places
    do_action( 'yoco_payment_gateway/order/refunded', $order, $body );
  • src/Gateway/Processors/PaymentProcessor.php line 62 · used in 2 places
    apply_filters( 'yoco_payment_gateway_debug', false );
  • src/Gateway/Payment/Request.php line 82 · used in 2 places
    apply_filters( 'yoco_payment_gateway/payment/request/headers', $headers );
  • src/Gateway/Refunds/Actions.php line 125 · used in 2 places
    apply_filters( 'yoco_payment_gateway/request/refund/args', $args );
  • src/Gateway/Gateway.php line 284
    apply_filters( 'woocommerce_gateway_icon', $icons, $this->id );
  • src/Gateway/Gateway.php line 264
    apply_filters( 'woocommerce_gateway_title', $title, $this->id );
  • src/Helpers/Money/Currencies.php line 12
    apply_filters( 'yoco_gateway_plugin/money/currencies', array( 'ZAR', ) );
  • src/Helpers/Admin/Notices.php line 54
    apply_filters( 'yoco_payment_gateway_admin_notice_prefix', __( 'Yoco Payments', 'yoco-payment-gateway' ) );
  • src/Gateway/Gateway.php line 57
    apply_filters( 'yoco_payment_gateway_form_fields', array() );
  • src/Gateway/Gateway.php line 419
    do_action( 'yoco_payment_gateway/admin/display_notices', $this );
  • src/Gateway/Processors/PaymentProcessor.php line 68
    do_action( 'yoco_payment_gateway/checkout/created', $order, $response['body'] );
  • src/Installation/Request.php line 62
    apply_filters( 'yoco_payment_gateway/installation/request/body', $body );
  • src/Installation/Request.php line 57
    apply_filters( 'yoco_payment_gateway/installation/request/headers', $headers );
  • src/Gateway/Metadata.php line 155
    do_action( "yoco_payment_gateway/order/meta/{$key}/{$action}", $order->get_id() );
  • src/Gateway/Payment/Request.php line 101
    apply_filters( 'yoco_payment_gateway/payment/request/body', $body );
  • yoco_wc_payment_gateway.php line 110
    do_action( 'yoco_payment_gateway/plugin/activated' );
  • src/Core/Setup.php line 124
    do_action( 'yoco_payment_gateway/plugin/compatible' );
  • yoco_wc_payment_gateway.php line 117
    do_action( 'yoco_payment_gateway/plugin/deactivated' );
  • src/Gateway/Refund/Request.php line 78
    apply_filters( 'yoco_payment_gateway/refund/request/headers', $headers );
  • src/Gateway/Refunds/Request.php line 67
    apply_filters( 'yoco_payment_gateway/refunds/request/headers', $headers );
  • src/Telemetry/Telemetry.php line 20
    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: