Check plugin properties exist
This commit is contained in:
parent
fc24e2f440
commit
d0d87b5e39
|
@ -1931,6 +1931,10 @@ add_filter( 'extra_plugin_headers', 'wc_enable_wc_plugin_headers' );
|
|||
* @return bool
|
||||
*/
|
||||
function wc_prevent_dangerous_auto_updates( $should_update, $plugin ) {
|
||||
if ( ! isset( $plugin->plugin, $plugin->new_version ) ) {
|
||||
return $should_update;
|
||||
}
|
||||
|
||||
if ( 'woocommerce/woocommerce.php' !== $plugin->plugin ) {
|
||||
return $should_update;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue