Don’t miss our Special Offer!

Up to 50% off
Grab Amelia
Grab Amelia

Amelia WP Hooks for Payments

Please note that using hooks requires a certain level of programming skills and included support refers only to advice.

Payment updated

amelia_before_payment_updated_filter

Users can use this filter to change payment data before it is updated from the backend.

Type: filter

Example:

function example($payment)
{
    // change payment data
    return $payment;
}

add_filter('amelia_before_payment_updated_filter', 'example', 10, 1);

amelia_before_payment_updated

Users can use this hook to do an action before the payment is updated from the backend.

Type: action

Example:

function example($payment)
{
    // do action
}

add_action('amelia_before_payment_updated', 'example', 10, 1);

amelia_after_payment_updated

Users can use this hook to do an action after a payment is updated from the backend.

Type: action

Example:

function example($payment)
{
    // do action
}

add_action('amelia_after_payment_updated', 'example', 10, 1);

Get payments

amelia_get_payments_filter

Users can change the payments retrieved before they are sent to the backend

Type: filter

Example:

function example($payments)
{
    return $payments;
}

add_filter('amelia_get_payments_filter', 'example', 10, 1);

amelia_get_payments

Users can use this hook to do an action before the payments are retrieved to the backend.

Type: action

Example:

function example($payments)
{
    // do action
}

add_action('amelia_get_payments', 'example', 10, 1);

Payment refunded

amelia_before_payment_refunded

Users can do an action before the payment is refunded

Type: action

Example:

function example($payment, $amount)
{
    // do action
}

add_action('amelia_before_payment_refunded', 'example', 10, 2);

amelia_after_payment_refunded

Users can do an action after the payment is refunded.

Type: action

Example:

function example($payment, $amount)
{
    // do action
}

add_action('amelia_after_payment_refunded', 'example', 10, 2);

Payment processed

amelia_before_payment_processed_filter

Users can change the data before the payment is processed (executed in the payment gateway). This hook is not used for Mollie or WooCommerce.

Type: filter

Example:

function example($paymentData, $reservation)
{
    return $paymentData;
}

add_filter('amelia_before_payment_processed_filter', 'example', 10, 2);

amelia_before_payment_processed

Users can use this hook to do an action before the payment is processed (executed in the payment gateway). This hook is not used for Mollie or WooCommerce.

Type: action

Example:

function example($paymentData, $reservation)
{
    // do action
}

add_action('amelia_before_payment_processed', 'example', 10, 2);

amelia_before_payment

Users can change the payment data before it is saved to the database.

Type: filter

Example:

function example($paymentData, $amount) 
{
   // change payment data
   return $paymentData;
}

add_filter('amelia_before_payment', 'example', 10, 2);

amelia_modify_payment_amount

User can change the final calculated price for booking.

Type: filter

Example:

function example($price, $booking)
{
    // change price 
    return $price;
}

add_filter('amelia_modify_payment_amount', 'example', 10, 2);

amelia_before_payment_link_callback_filter

User can change the payment data before the callback of the payment link or panel payment is executed.

Type: filter

Example:

function example($payment, $data)
{
    // change data
    return $payment;
}

add_filter('amelia_before_payment_link_callback_filter', 'example', 10, 2);

amelia_before_payment_link_callback

User can do an action before the callback of the payment link or panel payment is executed.

Type: action

Example:

function example($payment, $data)
{
    // do action
}

add_action('amelia_before_payment_link_callback', 'example', 10, 2);

amelia_after_payment_link_callback

User can do an action after the callback of the payment link or panel payment is executed.

Type: action

Example:

function example($payment, $data)
{
    // do action
}

add_action('amelia_after_payment_link_callback', 'example', 10, 2);

amelia_before_payment_from_panel_created_filter

User can change the data before the payment link for the panel is created

Type: filter

Example:

function example($data)
{
    // change data
    return $data;
}

add_filter('amelia_before_payment_from_panel_created_filter', 'example', 10, 1);

amelia_before_payment_from_panel_created

User can do an action before the payment link for the panel is created

Type: action

Example:

function example($data)
{
    // do action
}

add_action('amelia_before_payment_from_panel_created', 'example', 10, 1);

amelia_after_payment_from_panel_created_filter

User can change the data after the payment link for the panel is created

Type: filter

Example:

function example($paymentLinks, $data)
{
    // change payment links
    return $paymentLinks;
}

add_filter('amelia_after_payment_from_panel_created_filter', 'example', 10, 2);

amelia_after_payment_from_panel_created

User can do an action after the payment link for the panel is created

Type: action

Example:

function example($data, $paymentLink)
{
    // do action
}

add_action('amelia_after_payment_from_panel_created', 'example', 10, 2);

amelia_payment_link_amount

User can change the payment amount before the payment link is created

Type: filter

Example:

function example($amount, $data)
{
    // change amount
    return $amount;
}

add_filter('amelia_payment_link_amount', 'example', 10, 2);

amelia_before_payment_links_created

User can do an action before the payment links are created (for the e-mail or panel)

Type: action

Example:

function example($methods, $data, $amount)
{
    // do action
}

add_action('amelia_before_payment_links_created', 'example', 10, 3);

amelia_payment_links

User can change the payment links before they are used in the e-mail or panel. This hook isn’t applied for WooCommerce

Type: filter

Example:

function example($paymentLinks, $amount, $data)
{
    // change payment links
    return $paymentLinks;
}

add_filter('amelia_payment_links', 'example', 10, 3);

amelia_wc_payment_link

User can change the payment link for WooCommerce before they are used in the e-mail or panel

Type: filter

Example:

function example($paymentLinks, $amount, $data)
{
    // change payment links
    return $paymentLinks;
}

add_filter('amelia_wc_payment_link', 'example', 10, 3);

amelia_after_payment_links_created

User can do an action after the payment links are created (for the e-mail or panel)

Type: action

Example:

function example($paymentLinks, $data, $amount)
{
    // do action
}

add_action('amelia_after_payment_links_created', 'example', 10, 3);