In this document:
Description
WordPress hook that fires once a section in the settings is updated, where the $section_key
is dynamic.
Sections can include:
- advanced_scheduling
- blackout_dates
- calendar_events
- developer
- google_calendar
- mailchimp
- notifications
- payments
- paypal
- sms
- staff
- stripe
- styles
- tracking
- translation
- webex
- webhooks
- zoom
Placement
This code should be placed in the file of your custom plugin.
Source Code
This action is located in the SSA_Settings::update_section()
function in class-settings.php.
Usage for ssa/settings/$section key/updated
add_action('ssa/settings/' . $section_key . '/updated', 'new_function_name', 10, 2);
Parameters
$settings array
The new settings of the section that was updated, which follows the settings schema of the defined $section_key
.
$old_settings array
The old settings of the section that was updated follow the settings schema of the defined$section_key
.
Example – Show an Alert When the Style Settings are Updated
add_action('ssa/settings/styles/updated', 'alert_style_settings_updated', 10, 2);
function alert_style_settings_updated($settings, $old_settings)
{
echo "SSA Style settings were edited";
}
Related Guides
-
Developer Settings
-
New Booking App
-
ssa/appointments/customer_information/get_defaults Filter
-
ssa/templates/get_template_vars Filter