WC_Checkout::is_registration_required()publicWC 3.0.0

Is registration required to checkout?

Method of the class: WC_Checkout{}

Return

true|false.

Usage

$WC_Checkout = new WC_Checkout();
$WC_Checkout->is_registration_required();

Changelog

Since 3.0.0 Introduced.

WC_Checkout::is_registration_required() code WC 8.7.0

public function is_registration_required() {
	/**
	 * Controls if registration is required in order for checkout to be completed.
	 *
	 * @since 3.0.0
	 *
	 * @param bool $checkout_registration_required If customers must be registered to checkout.
	 */
	return apply_filters( 'woocommerce_checkout_registration_required', 'yes' !== get_option( 'woocommerce_enable_guest_checkout' ) );
}