Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 387a296

Browse files
authored
Change checkoutAllowsGuest to the correct value. (#4146)
* cast correct value of setting * fix typo
1 parent fc200a6 commit 387a296

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

src/BlockTypes/Checkout.php

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,23 @@ function() {
144144
true
145145
);
146146
$this->asset_data_registry->add( 'baseLocation', wc_get_base_location(), true );
147-
$this->asset_data_registry->add( 'checkoutAllowsGuest', WC()->checkout()->is_registration_required(), true );
148-
$this->asset_data_registry->add( 'checkoutAllowsSignup', WC()->checkout()->is_registration_enabled(), true );
149-
$this->asset_data_registry->add( 'checkoutShowLoginReminder', 'yes' === get_option( 'woocommerce_enable_checkout_login_reminder' ), true );
147+
$this->asset_data_registry->add(
148+
'checkoutAllowsGuest',
149+
false === filter_var(
150+
WC()->checkout()->is_registration_required(),
151+
FILTER_VALIDATE_BOOLEAN
152+
),
153+
true
154+
);
155+
$this->asset_data_registry->add(
156+
'checkoutAllowsSignup',
157+
filter_var(
158+
WC()->checkout()->is_registration_enabled(),
159+
FILTER_VALIDATE_BOOLEAN
160+
),
161+
true
162+
);
163+
$this->asset_data_registry->add( 'checkoutShowLoginReminder', filter_var( get_option( 'woocommerce_enable_checkout_login_reminder' ), FILTER_VALIDATE_BOOLEAN ), true );
150164
$this->asset_data_registry->add( 'displayCartPricesIncludingTax', 'incl' === get_option( 'woocommerce_tax_display_cart' ), true );
151165
$this->asset_data_registry->add( 'displayItemizedTaxes', 'itemized' === get_option( 'woocommerce_tax_total_display' ), true );
152166
$this->asset_data_registry->add( 'taxesEnabled', wc_tax_enabled(), true );

0 commit comments

Comments
 (0)