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