edit_user_created_user hook – using to update Groups

The GravityForms folks chimed in. To clarify, I wanted to add a row to a database table on user activation (not on form submit), and I had not found that hook. Here is the completed code… add_action( ‘gform_user_registered’, ‘hl_add_group’, 10, 4 ); function hl_add_group($user_id, $feed, $entry) { $group = $entry[8]; global $wpdb; // add form … Read more

Where do I put my create_new_table function()?

The code you are currently using for being used as a plugin. register_activation_hook is reserved for plugin use only. It only fires when plugin in activated. If you want to create database table from your theme you can use after_switch_theme. It can be used like bellow: add_action(“after_switch_theme”, “mental_health_providers_create_db”); function mental_health_providers_create_db() { global $wpdb; $charset_collate = … Read more