Back to Developer Guides

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";
}

Still stuck?

File a support ticket with our five-star support team to get more help.

File a ticket

  • Please provide any information that will be helpful in helping you get your issue fixed. What have you tried already? What results did you expect? What did you get instead?
  • This field is for validation purposes and should be left unchanged.


Related Guides