Limited time discount Book Smarter This Christmas
Up to 50%Off

How can I use WordPress hooks for settings in Amelia

Amelia provides several hooks related to settings, allowing you to modify configuration data or run custom actions when settings are retrieved, updated, or applied in the back end. These hooks help you extend Amelia behavior without modifying core plugin files.

Info Note

Hooks require programming knowledge, and support is limited to general guidance.

Get settings

How do I modify settings before they are displayed?

amelia_get_settings_filter

Type: filter

Use this filter to modify settings before they are returned for back end display.

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

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

How do I run code before settings are returned?

amelia_get_settings

Type: action

Runs before settings are returned for back end display.

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

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

Update settings

How do I modify settings before they are saved?

amelia_before_settings_updated_filter

Type: filter

Use this filter to modify settings before they are saved.

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

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

How do I run code before settings are saved?

amelia_before_settings_updated

Type: action

Runs before settings are saved.

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

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

How do I run code after settings are saved?

amelia_after_settings_updated

Type: action

Runs after settings are saved.

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

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

SSL verification handling

How do I disable SSL verification during activation?

amelia/curlopt_ssl_verifypeer

Type: filter

Use this filter to bypass SSL certificate verification when activating Amelia, for example if the SSL certificate is missing or expired.

				
					function example()
{
    return 0;
}

add_filter('amelia/curlopt_ssl_verifypeer', 'example', 10, 2);
				
			

Scripts loaded

How do I run code after Amelia scripts are loaded?

ameliaScriptsLoaded

Type: action

Runs after all Amelia scripts are loaded, including payment gateways and external APIs such as PayPal, Razorpay, and Google Maps.

				
					function example_callback()
{
    // do action
}

add_action('ameliaScriptsLoaded', 'example_callback', 10, 0);