Don’t miss our Special Offer!

Up to 50% off
Grab Amelia
Grab Amelia

Amelia WP Hooks for Coupons

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

Coupon validated

amelia_before_validate_coupon_filter

Users can use this filter to manipulate coupon data before it is validated.

Type: filter

Example:

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

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

amelia_before_validate_coupon

Users can use this hook to do an action before the coupon is validated.

Type: action

Example:

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

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

amelia_after_validate_coupon

Users can use this hook to do an action after the coupon is validated.

Type: action

Example:

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

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

Coupon added

amelia_before_coupon_added_filter

Users can use this filter to manipulate coupon data before it is added.

Type: filter

Example:

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

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

amelia_before_coupon_added

Users can use this hook to do an action before the coupon is added.

Type: action

Example:

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

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

amelia_after_coupon_added

Users can use this hook to do an action after a coupon is added.

Type: action

Example:

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

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

Coupon updated

amelia_before_coupon_updated_filter

Users can change the coupon data before it is updated.

Type: filter

Example:

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

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

amelia_before_coupon_updated

User can use this hook to do an action before the coupon is updated.

Type: action

Example:

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

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

amelia_after_coupon_updated

Users can use this hook to do an action after the coupon is updated.

Type: action

Example:

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

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

Get coupons

amelia_get_coupons_filter

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

Type: filter

Example:

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

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

amelia_get_coupons

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

Type: action

Example:

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

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

Get coupon

amelia_get_coupon_filter

Users can change the coupon data before it is retrieved for the backend.

Type: filter

Example:

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

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

amelia_get_coupon

Users can use this hook to do an action before the coupon is retrieved for the backend.

Type: action

Example:

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

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

Coupon deleted

amelia_before_coupon_deleted

Users can use this hook to do an action before the coupon is deleted.

Type: action

Example:

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

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

amelia_after_coupon_deleted

Users can use this hook to do an action after the coupon is deleted.

Type: action

Example:

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

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