WC_WCCOM_Site_Installer_Requirements_Check::met_requirements()

Check if the site met the requirements


Description Description


Return Return

(bool|WP_Error) Does the site met the requirements?


Top ↑

Source Source

File: includes/wccom-site/class-wc-wccom-site-installer-requirements-check.php

	public static function met_requirements() {
		$errs = array();

		if ( ! self::met_wp_cron_requirement() ) {
			$errs[] = 'wp-cron';
		}

		if ( ! self::met_filesystem_requirement() ) {
			$errs[] = 'filesystem';
		}

		if ( ! empty( $errs ) ) {
			// translators: %s: Requirements unmet.
			return new WP_Error( 'requirements_not_met', sprintf( __( 'Server requirements not met, missing requirement(s): %s.', 'woocommerce' ), implode( ', ', $errs ) ), array( 'status' => 400 ) );
		}

		return true;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.