woocommerce_checkout_registration_enabled filter-hookWC 3.0.0

Determines if customer registration is enabled during checkout.

Usage

add_filter( 'woocommerce_checkout_registration_enabled', 'wp_kama_woocommerce_checkout_registration_enabled_filter' );

/**
 * Function for `woocommerce_checkout_registration_enabled` filter-hook.
 * 
 * @param bool $checkout_registration_enabled If checkout registration is enabled.
 *
 * @return bool
 */
function wp_kama_woocommerce_checkout_registration_enabled_filter( $checkout_registration_enabled ){

	// filter...
	return $checkout_registration_enabled;
}
$checkout_registration_enabled(true|false)
If checkout registration is enabled.

Changelog

Since 3.0.0 Introduced.

Where the hook is called

WC_Checkout::is_registration_enabled()
woocommerce_checkout_registration_enabled
woocommerce/includes/class-wc-checkout.php 219
return apply_filters( 'woocommerce_checkout_registration_enabled', 'yes' === get_option( 'woocommerce_enable_signup_and_login_from_checkout' ) );

Where the hook is used in WooCommerce

woocommerce/includes/class-wc-checkout.php 107
remove_filter( 'woocommerce_checkout_registration_enabled', '__return_true', 0 );
woocommerce/includes/class-wc-checkout.php 108
remove_filter( 'woocommerce_checkout_registration_enabled', '__return_false', 0 );
woocommerce/includes/class-wc-checkout.php 109
add_filter( 'woocommerce_checkout_registration_enabled', $bool_value ? '__return_true' : '__return_false', 0 );