Check your plugin or themes auto update enabled or not in wordpress

August 8th, 2020 admin 62 Views 0 Uncategorised58 seconds

In this tutorial we will see how to get the plugin auto update enabled in wordpress or not. This will be a helpful function for the developers. Below id the code for checking plugin. For checking theme auto update is enabled or not we will need to change the argument to theme instead of plugin.

For checking plugin auto update enabled or not

$checkautoupdate = wp_is_auto_update_enabled_for_type( 'plugin' );

if( $checkautoupdate === true){
      // do something update enabled
   }else{
      // Auto update not enabled
   }

For checking theme auto update enabled or not

$checkautoupdate = wp_is_auto_update_enabled_for_type( 'theme' );

if( $checkautoupdate === true){
      // do something update enabled
   }else{
      // Auto update not enabled
   }

Supported from : WordPress version 5.5

About The Author

admin

Leave Your Thoughts Here...

We are glad you have chosen to leave a comment. Please keep in mind that comments are moderated according to our comment policy.

Name *
Comment

We are glad you have chosen to leave a comment. Please keep in mind that comments are moderated according to our comment policy.