Swish ECommerce - Hooks (Actions)
Hooks in WordPress essentially allow you to change or add code without editing core files. They are used extensively throughout WordPress and WooCommerce and are very useful for developers.
Callback Action
Action: 'woocommerce_api_wc_gateway_swish_ecommerce'
Description: Fired when a callback related to Swish is recived
Valid Paymentrequest Callback Action
Action: 'valid-swish-ecommerce-paymentrequest-callback'
Parameters:
$posted
String containing callback data from Swish
$order
A WC_Order
object related to the order.
Description: Fired when the callback was validated.
Valid Refund Callback Action
Action: 'valid-swish-ecommerce-refund-callback'
Parameters:
$posted
String containing callback data from Swish
$order
A WC_Order
object related to the order.
Description: Fired when the callback was validated.
Before Form Fields Action
Action: 'redlight_swish_ecommerce_form_start'
Parameters:
$posted
String payment gateway id redlight_swish-ecommerce
Description: Fired before the form fields are displayed in checkout
After Form Fields Action
Action: 'redlight_swish_ecommerce_form_end'
Parameters:
$posted
String payment gateway id redlight_swish-ecommerce
Description: Fired after the form fields are displayed in checkout