woocommerce_checkout_registration_enabled хук-фильтрWC 3.0.0

Is registration enabled on the checkout page?

Использование

add_filter( 'woocommerce_checkout_registration_enabled', 'wp_kama_woocommerce_checkout_registration_enabled_filter' );

/**
 * Function for `woocommerce_checkout_registration_enabled` filter-hook.
 * 
 * @param  $string 
 *
 * @return 
 */
function wp_kama_woocommerce_checkout_registration_enabled_filter( $string ){

	// filter...
	return $string;
}
$string
-

Список изменений

С версии 3.0.0 Введена.

Где вызывается хук

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

Где используется хук в WooCommerce

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