Skip to content

Instantly share code, notes, and snippets.

@theRealRizeo
Created April 13, 2022 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theRealRizeo/9af58d244855c0f306e248c3a87e8c19 to your computer and use it in GitHub Desktop.
Save theRealRizeo/9af58d244855c0f306e248c3a87e8c19 to your computer and use it in GitHub Desktop.
Custom Settings Save action
<?php
add_action( 'hubloy_membership_update_settings_section', 'my_custom_settings_form_update', 10, 2 );
function my_custom_settings_form_update( $section, $post_data ) {
if ( 'custom' !== $section ) {
return;
}
// Handle your logic here.
return rest_ensure_response(
array(
'status' => true,
'message' => 'Settings saved',
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment