WordPress hook after post content and meta update

I want to update one of my meta field and redirect and I am using post_updatedhook. Here is my code.

function job_publish_status( $  post_ID, $  post_after, $  post_before ) {    $  job_published_date = get_the_time("Y-m-d", $  post_ID);    $  expire_date = date('Y-m-d', strtotime($  job_published_date. ' + 60 days'));    update_post_meta($  post_ID, '_job_expires', $  expire_date);    $  url = get_site_url();    $  url = $  url.'/wp-admin/post.php?post='.$  post_ID.'&action=edit';    wp_redirect( $  url );    exit;  } add_action('post_updated', 'job_publish_status', 99, 3 ); 

It is updating this _job_expires meta field and redirecting correctly. When I edit post content and title, its updates title and content but it is not updating other meta fields in this post. Is there any hook which triggers after post content update and meta fields update ?

Is there any hook or filter that user data, specifically email address, is passed through on new order creation?

I want to create a function/module that corrects common email typos on new orders.

For example to auto correct gmail.con, hotmail.con to .com, and many many more common typos.

Is there any hook or filter that user data, specifically email address, is passed through on new order creation, so that we can modify it before it’s inserted into the database?

Execute Hook on the footer or header after activating a plugin

I have the following code fraction, but it does not work, I want that after activating a plugin this calls an action on the footer and prints something, but I can’t do it, the problem seems that the admin_footer does not run, I don’t know if activated_plugin is just before or after the html is printed so that the admin_footer, or how could I fix it?

add_action( 'activated_plugin', 'admin_activated_plugin' ); function admin_activated_plugin(){   // up to here if you run ....   // but   // the hook below doesn't   add_action( 'admin_footer', 'after_activate_print_footer', 99 ); } function after_activate_print_footer(){  echo "something"; } 

In conclusion, I want to print a text in the header or footer just after a plugin is activated

Action or Filter Hook for a Custom Importer

I’m trying to write a custom bulk importer for store locations but I am struggling with which action hook to use.

I have written it and tested it on a clean WordPress installation and it works fine there but when I try to use it alongside WooCommerce I get an error on every admin page.

I’ve traced the fault back and I think it is being caused by the filter hook I am trying to use.

add_filter('pre_update_option',[$  this,'importLocations'],10,3); 

My import method looks like this:

public function importLocations($  newvalue,$  option,$  oldvalue){     if('stockist_settings'==$  option && !empty($  newvalue['fileimport'])){          $  file=get_attached_file($  newvalue['fileimport'][0]);          $  locations=$  this->parseCSVToArray($  file);          if(!empty($  locations)){             $  prefix = $  this->getAttributes()['slug']."_";             foreach($  locations as $  location){                  // Checks that the longitude and latitude are filled out                 if(empty($  location['Lat']) || empty($  location['Lng'])){                     $  geocoder=new Geocoder();                     $  lnglat = $  geocoder->geocodePostcode($  location['Postcode']);                     $  location['Lat']=$  lnglat['latitude'];                     $  location['Lng']=$  lnglat['longitude'];                 }                  $  social=$  this->parseSocialMedia($  location);                  $  v = new Valitron\Validator($  location);                 $  v->rules($  this->setImportRules());                 if($  v->validate()) {                      $  payload=[                         'post_title'    =>  $  location['CompanyName'],                         'post_type'     =>  $  this->getAttributes()['slug'],                         'post_status'   =>  'publish',                         'meta_input'    =>  [                             $  prefix.'address1'      =>  $  location['Address1'],                             $  prefix.'address2'      =>  $  location['Address2'],                             $  prefix.'address3'      =>  $  location['Address3'],                             $  prefix.'city'          =>  $  location['City'],                             $  prefix.'postcode'      =>  $  location['Postcode'],                             $  prefix.'phonenumber'   =>  $  location['PhoneNumber'],                             $  prefix.'website'       =>  $  location['Website'],                             $  prefix.'email'         =>  $  location['Email'],                             $  prefix.'longitude'     =>  $  location['Lng'],                             $  prefix.'latitude'      =>  $  location['Lat'],                             $  prefix.'socialrepeat_group'=>$  social                         ]                     ];                      $  id=wp_insert_post($  payload);                  } else {                     // Errors                     print_r($  v->errors());                 }             }              wp_redirect(admin_url('/edit.php?post_type=stockists'),301);         }     } } 

Is there a better filter hook this I should use or am I approaching the bulk import from the wrong direction entirely?

Is it possible to trigger Zapier hook on a post update and pass ACF fields?

I got myself into a bit of a pickle with a website and I would love some help.

I am attempting to trigger a Zapier hook when a custom post type is updated, and send any ACF fields with it. Is this possible?

Previously, I tried using Gravity Forms and the Advanced Post Creation add-on. I had Gravity View show the entry to the user where they could edit. The problem is that Advanced Post Creation only works on post submission and not update.

So I switched to just having the user edit the post directly, but I don’t know how to trigger the hook when a post is updated AND send the ACF fields in the post with it.

If you can point me in the right direction on one of the following, that would be awesome:

  1. Update a custom post type when updating an entry via Gravity View OR
  2. At least trigger a Zapier hook when a post is updated

Thank You!

Hook to change Logout url

I used this hook to replace the exit address . Now, unfortunately, this hook does not work and I can not understand why

add_filter('logout_url', 'my_custom_logout_url');         function my_custom_logout_url($  force_reauth, $  redirect=null){         $  logout_url = wp_nonce_url(site_url('logout.php')."?action=logout", 'log-out' );         if (empty($  redirect)) $  redirect=home_url();         $  logout_url = add_query_arg('redirect_to', urlencode( $  redirect )."", $  logout_url );         return $  logout_url ;         } 

Get Category Id While Using edited_category Hook

From the wp admin screen, edit category tab, I am trying to get the category id from the url. I am trying to get the category id. I am using edited_category action, since I need to post data to wp_termmeta table:

/wp-admin/term.php?taxonomy=category&tag_ID=1 

But it is returning null, since it redirects me to

/wp-admin/edit-tags.php 

Here is my code:

function saveCategoryFields() {      $  cat_id = $  _POST['tag_ID'];     var_dump($  cat_id); //returns NULL     if( isset( $  _POST['post-order'] )){         if ($  _POST['post-order'] == 'oldest')  {             // check category id and reorder posts             if ( $  query->is_category($  cat_id) && $  query->is_main_query()) {                 $  query->set( 'order', 'ASC' );             }             //update field             $  order = sanitize_title( $  _POST['post-order'] );             update_term_meta($  _POST['tag_ID'], 'post-order', $  order);          }     } } add_action ( 'edited_category', 'saveCategoryFields'); 

As a result, I am getting the following error, when clicking save:

“Fatal error: Uncaught Error: Call to a member function is_category() on null”

I tried to store the category id in another function and call the function inside and I also tried to save it as a global variable, but it is still not working. Please, help. I want to get the category id so i can do the check and reorder the posts from the category that is currently being edited by the user.

Using a “grappling hook” in combat

So my character has the ability to use the Levitate spell, and while useful, it does require me to push or pull of an object or surface. To make this easier I thought about using a “grappling hook”. Something simple, like a 20ft length of rope, with a hook on the end. This could make moving around much easier.

However, I was wondering more specifically about it’s use in combat. The tricky part is that my character is dex based, not str. 14 dex and 10 str. So it’s use would be to simply attempt to throw an enemy off balance, or impose disadvantage on their next roll, for example.

The use in this situation would have to be finesse based, potentially, or the goal would be an opposed check vs the targets dex (and my dex, hopefully).

Is there anything in the rules about something like this? Or is it entirely Homebrew?