WC_Updates_Screen_Updates::update_screen_modal() public WC 1.0
Show a warning message on the upgrades screen if the user tries to upgrade and has untested plugins.
{} Это метод класса: WC_Updates_Screen_Updates{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$WC_Updates_Screen_Updates = new WC_Updates_Screen_Updates(); $WC_Updates_Screen_Updates->update_screen_modal();
Код WC_Updates_Screen_Updates::update_screen_modal() WC Updates Screen Updates::update screen modal WC 5.0.0
public function update_screen_modal() {
$updateable_plugins = get_plugin_updates();
if ( empty( $updateable_plugins['woocommerce/woocommerce.php'] )
|| empty( $updateable_plugins['woocommerce/woocommerce.php']->update )
|| empty( $updateable_plugins['woocommerce/woocommerce.php']->update->new_version ) ) {
return;
}
$this->new_version = wc_clean( $updateable_plugins['woocommerce/woocommerce.php']->update->new_version );
$this->major_untested_plugins = $this->get_untested_plugins( $this->new_version, 'major' );
if ( ! empty( $this->major_untested_plugins ) ) {
echo $this->get_extensions_modal_warning(); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
$this->update_screen_modal_js();
}
}