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

Load wc-blocks-registry at the load of the page instead of lazy load it #7813

Merged
merged 1 commit into from
Dec 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/BlockTypes/MiniCart.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected function get_block_type_script( $key = null ) {
$script = [
'handle' => 'wc-' . $this->block_name . '-block-frontend',
'path' => $this->asset_api->get_block_asset_build_path( $this->block_name . '-frontend' ),
'dependencies' => [],
'dependencies' => [ 'wc-blocks-registry' ],
];
return $key ? $script[ $key ] : $script;
}
Expand Down Expand Up @@ -273,7 +273,7 @@ protected function append_script_and_deps_src( $script ) {
}
}
}
if ( ! $script->src ) {
if ( ! $script->src || 'wc-blocks-registry' === $script->handle ) {
return;
}

Expand Down