WC_Install::newly_installed()
Trigger woocommerce_newly_installed for new installations.
Метод класса: WC_Install{}
Хуки из метода
Возвращает
null
. Ничего (null).
Использование
$result = WC_Install::newly_installed();
Список изменений
С версии 8.0.0 | Введена. |
Код WC_Install::newly_installed() WC Install::newly installed WC 9.8.2
public static function newly_installed() { if ( 'yes' === get_option( self::NEWLY_INSTALLED_OPTION, false ) ) { /** * Run when WooCommerce has been installed for the first time. * * @since 6.5.0 */ do_action( 'woocommerce_newly_installed' ); do_action_deprecated( 'woocommerce_admin_newly_installed', array(), '6.5.0', 'woocommerce_newly_installed' ); update_option( self::NEWLY_INSTALLED_OPTION, 'no' ); /** * This option is used to track the initial version of WooCommerce that was installed. * * @since 9.2.0 */ add_option( self::INITIAL_INSTALLED_VERSION, WC()->version, '', false ); } }