Title: Disable Jetpack_Sync_Module_Posts action
Last modified: November 3, 2023

---

# Disable Jetpack_Sync_Module_Posts action

 *  Resolved [edward_plainview](https://wordpress.org/support/users/edward_plainview/)
 * (@edward_plainview)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/disable-jetpack_sync_module_posts-action/)
 * How does one disable the Jetpack_Sync_Module_Posts class from hooking into the
   transition_post_status action?
 * Previously one could search for the add-on name and disable it but that seems
   to have changed from v12.4 to v12.7.
 * Here is the code I used previously:
 *     ```wp-block-code
           global $wp_filter;
           $hook = 'transition_post_status';
           $filters = $wp_filter[ $hook ];
           if ( is_object( $filters ) )
               $filters = $filters->callbacks;
           else
               return;
   
           foreach( $filters as $priority => $callbacks )
           {
               foreach( $callbacks as $callback )
               {
                   // We're looking for a class.
                   $function = $callback[ 'function' ];
                   if ( ! is_array( $function ) )
                       continue;
                   $callback_class = $function[ 0 ];
                   if ( ! is_object( $callback_class ) )
                       continue;
                   // We are looking for Jetpack.
                   if ( get_class( $callback_class ) != 'Jetpack_Sync_Module_Posts' )
                       continue;
                   $function_name = $function[ 1 ];
                   // And this specific function.
                   if ( $function_name != 'save_published' )
                       continue;
   
                   // Found it. Remove it.
                   $this->debug( 'Removing transition_post_status action for the post sync module.' );
                   remove_action( $hook, $callback[ 'function' ], $priority, $callback[ 'accepted_args' ] );
               }
           }
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [2 years, 7 months ago](https://wordpress.org/support/topic/disable-jetpack_sync_module_posts-action/#post-17188484)
 * Of note, we’re currently discussing this on GitHub here:
 * [https://github.com/Automattic/jetpack/issues/34024](https://github.com/Automattic/jetpack/issues/34024)
 *  Thread Starter [edward_plainview](https://wordpress.org/support/users/edward_plainview/)
 * (@edward_plainview)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/disable-jetpack_sync_module_posts-action/#post-17198513)
 * The solution is, instead of trying to unhook the module to prevent it from dupe
   posting when broadcasting, to use the `publicize_should_publicize_published_post`
   filter.
 * Marking as closed.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Disable Jetpack_Sync_Module_Posts action’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [edward_plainview](https://wordpress.org/support/users/edward_plainview/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/disable-jetpack_sync_module_posts-action/#post-17198513)
 * Status: resolved