This commit is contained in:
Mike Jolley 2023-01-16 10:53:12 +00:00 committed by GitHub
parent e9b07c9ebf
commit fcc9bacdc9
1 changed files with 3 additions and 1 deletions

View File

@ -255,7 +255,9 @@ class Checkout extends AbstractBlock {
$this->asset_data_registry->add( 'hasDarkEditorStyleSupport', current_theme_supports( 'dark-editor-style' ), true );
$this->asset_data_registry->register_page_id( isset( $attributes['cartPageId'] ) ? $attributes['cartPageId'] : 0 );
$local_pickup_enabled = filter_var( get_option( 'woocommerce_pickup_location_settings' )['enabled'], FILTER_VALIDATE_BOOLEAN ) ?? false;
$pickup_location_settings = get_option( 'woocommerce_pickup_location_settings', [] );
$local_pickup_enabled = wc_string_to_bool( $pickup_location_settings['enabled'] ?? 'no' );
$this->asset_data_registry->add( 'localPickupEnabled', $local_pickup_enabled, true );
$is_block_editor = $this->is_block_editor();