Save_post hook only working on quickedit
-
Hi,
I want to sync values between two posts so that when one of them changes ( “the parent” ) it updates other post automatically.
I tried ‘edit_post’, ‘post_updated’ and ‘save_post_{$post->post_type}’.
All of them work when I quick edit as administrator, and save_post works also when I create a post anywhere on my site. But what I need is for it to work everytime a any of the post variables get updated.This is how I am using it:
add_action( 'save_post_product', 'sync_producto_contenido', 10, 3); function sync_producto_contenido( int $post_ID, WP_Post $post, bool $update) { deb("Sincronizando producto y contenido.."); // Campos del producto que hemos creado $producto_title = get_the_title( $post_ID); .. .. }
Any idea?
Thank you
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Save_post hook only working on quickedit’ is closed to new replies.