[wp-trac] [WordPress Trac] #49626: Allow plugin developers to opt-out their plugin from auto updates

WordPress Trac noreply at wordpress.org
Thu Mar 12 01:40:09 UTC 2020


#49626: Allow plugin developers to opt-out their plugin from auto updates
-----------------------------+------------------------------
 Reporter:  JaworskiMatt     |       Owner:  (none)
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Plugins          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------

Comment (by TimothyBlynJacobs):

 Thanks for your ticket @JaworskiMatt!

 I think there is a filter that would already be usable for this purpose:
 [https://developer.wordpress.org/reference/hooks/auto_update_type/
 `auto_update_{$type}`].

 {{{#!php
 <?php
 add_filter( 'auto_update_plugin', function ( $update, $item ) {
         if ( $item->plugin === 'your-plugin/your-file.php' ) {
                 return false;
         }

         return $update;
 }, 10, 2 );
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49626#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list