BSF_Update_Manager::use_beta_version( int $product_id )

Use Beta version.


Description


Parameters

$product_id

(int) (Required) Product ID.


Return

(bool.)


Source

File: admin/bsf-core/class-bsf-update-manager.php

		public function use_beta_version( $product_id ) {

			$product = get_brainstorm_product( $product_id );
			$stable  = isset( $product['remote'] ) ? $product['remote'] : '';
			$beta    = isset( $product['version_beta'] ) ? $product['version_beta'] : '';

			// If beta version is not set, return.
			if ( '' === $beta ) {
				return false;
			}

			if ( version_compare( $stable, $beta, '<' ) &&
				self::bsf_allow_beta_updates( $product_id ) ) {

				return true;
			}

			return false;
		}


User Contributed Notes

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