WC_Install::newly_installed()private staticWC 8.0.0

Trigger woocommerce_newly_installed for new installations.

Method of the class: WC_Install{}

Return

null. Nothing (null).

Usage

$result = WC_Install::newly_installed();

Changelog

Since 8.0.0 Introduced.

WC_Install::newly_installed() code WC 9.0.1

private 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' );
	}
}