Update only some custom user fields

I have found the solution do_action(‘edit_user_profile_update’, $current_user->ID); was the problem. After I commented it out the update went fine. do_action is a plugin hook and expected way more that the from gave: explanation

Ajax call URL 404’ing when pushed to staging server

Take a look at wp localize script. It’ll allow you to encode your url into a separate javascript object before your script is loaded. get_template_directory retrieves the absolute path to the directory of the current theme. Use it in case your WP install directory is different than your local development. The theme directory can also … Read more

Display result of custom form

First, your code attempts to use $_POST[‘nom’] whether the value is set or not. You are generating non-fatal “Undefined index” warning every time that runs. Clean that up and use !empty($_POST[‘nom’]) instead of $_POST[‘nom’]!=NULL. With template_redirect you’d want to redirect to an existing page, something like the following from another answer: function redirect_cat_wpse_207298() { if … Read more

Processing forms with php to wordpress database

I’m pretty sure you don’t quote the $variable at all when doing a query with wpdb. So ‘association_first_name’ => ‘$legalname’ would be ‘association_first_name’ => $legalname But that might not solve all your problems.

Passing link parameter values to form

Sorry for this question, I founded the solution, now I know that i’m a dummy. if($_GET[‘action’] == ‘edit’) for everyone has my same drama. (the question remains open for better suggestions about doing that, in the best and most secure way) Tank you for any suggestion.

Submitting my form to the database and then redirecting to payment site

Good afternoon, I managed to sort this out. I have amended my functions.php to the following. function mcPaySubmit(){ global $wpdb; include(‘paygate.php’); $last = wp_get_recent_posts(array(‘numberposts’ => ‘1’, ‘post_type’ => ‘post’, ‘post_status’ => ‘pending’, ‘author’ => $user_id)); $purchase_post_id = $last[‘0’][‘ID’]; $purchase_days = $_POST[‘dext’]; $purchase_date = $_POST[‘mcTransactionDate’]; $purchase_amount = $_POST[‘totalDue’]; if($wpdb->insert(‘ac_purchases’, array( ‘purchase_post_id’ => $purchase_post_id, ‘purchase_days’ => $purchase_days, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)