Prevent undefined variable notice on checkout (https://github.com/woocommerce/woocommerce-blocks/pull/8197)
This commit is contained in:
parent
e9b07c9ebf
commit
fcc9bacdc9
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue