WC_Admin_Setup_Wizard::should_show_theme()
Устарела с версии 4.6.0. Больше не поддерживается и может быть удалена. Рекомендуется заменить эту функцию на аналог.
The theme "extra" should only be shown if the current user can modify themes and the store doesn't already have a WooCommerce theme.
Метод класса: WC_Admin_Setup_Wizard{}
Хуков нет.
Возвращает
true|false
.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->should_show_theme();
Список изменений
Устарела с | 4.6.0 |
Код WC_Admin_Setup_Wizard::should_show_theme() WC Admin Setup Wizard::should show theme WC 8.7.0
protected function should_show_theme() { _deprecated_function( __CLASS__ . '::' . __FUNCTION__, '4.6.0', 'Onboarding is maintained in WooCommerce Admin.' ); $support_woocommerce = current_theme_supports( 'woocommerce' ) && ! wc_is_wp_default_theme_active(); return ( current_user_can( 'install_themes' ) && current_user_can( 'switch_themes' ) && ! is_multisite() && ! $support_woocommerce ); }