DescriptionUsageParametersExamplesSource Code
Description
The 「gform_post_payment_refunded」 action in Gravity Forms is triggered after a payment is refunded, allowing further actions to be taken.
Usage
add_action( 'gform_post_payment_refunded', 'my_function', 10, 2 );
Parameters
$entry Entry Object
The entry object that was created.
$action array
The action that occurred. Contains things such as the amount, what occurred, and the transaction ID.
$action = array(
'type' => '',
'amount' => '',
'transaction_type' => '',
'transaction_id' => '',
'subscription_id' => '',
'entry_id' => '',
'payment_status' => '',
'note' => '',
);
Examples
function my_function() {
//Do something here
}
add_action( 'gform_post_payment_refunded', 'my_function', 10, 2 );
Source Code
do_action( 'gform_post_payment_refunded', $entry, $action );
This action hook is located in GFPaymentAddOn::refund_payment() in includes/addon/class-gf-payment-addon.php.