woocommerce_checkout_registration_enabled
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
woocommerce_checkout_registration_enabled
woocommerce/includes/class-wc-checkout.php 223
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 111
remove_filter( 'woocommerce_checkout_registration_enabled', '__return_true', 0 );
woocommerce/includes/class-wc-checkout.php 112
remove_filter( 'woocommerce_checkout_registration_enabled', '__return_false', 0 );
woocommerce/includes/class-wc-checkout.php 113
add_filter( 'woocommerce_checkout_registration_enabled', $bool_value ? '__return_true' : '__return_false', 0 );