This repository was archived by the owner on Feb 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +1
-23
lines changed
assets/js/blocks/product-query Expand file tree Collapse file tree 2 files changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -47,11 +47,6 @@ const GLOBAL_HIDE_OUT_OF_STOCK = getSetting< boolean >(
4747 false
4848) ;
4949
50- const isArchiveProductTemplate = getSetting < boolean > (
51- 'is_archive_product_template' ,
52- false
53- ) ;
54-
5550export const QUERY_DEFAULT_ATTRIBUTES : QueryBlockAttributes = {
5651 allowedControls : DEFAULT_ALLOWED_CONTROLS ,
5752 displayLayout : {
@@ -69,7 +64,7 @@ export const QUERY_DEFAULT_ATTRIBUTES: QueryBlockAttributes = {
6964 search : '' ,
7065 exclude : [ ] ,
7166 sticky : '' ,
72- inherit : isArchiveProductTemplate ,
67+ inherit : false ,
7368 __woocommerceAttributes : [ ] ,
7469 __woocommerceStockStatus : GLOBAL_HIDE_OUT_OF_STOCK
7570 ? Object . keys ( objectOmit ( STOCK_STATUS_OPTIONS , 'outofstock' ) )
Original file line number Diff line number Diff line change @@ -113,23 +113,6 @@ public function update_query( $pre_render, $parsed_block ) {
113113 }
114114 }
115115
116- /**
117- * Extra data passed through from server to client for block.
118- *
119- * @param array $attributes Any attributes that currently are available from the block.
120- * Note, this will be empty in the editor context when the block is
121- * not in the post content on editor load.
122- */
123- protected function enqueue_data ( array $ attributes = [] ) {
124- parent ::enqueue_data ( $ attributes );
125-
126- global $ pagenow ;
127- // phpcs:ignore WordPress.Security.NonceVerification.Recommended
128- $ post_id = isset ( $ _GET ['postId ' ] ) ? sanitize_text_field ( wp_unslash ( $ _GET ['postId ' ] ) ) : null ;
129- $ is_archive_product_template = 'site-editor.php ' === $ pagenow && 'woocommerce/woocommerce//archive-product ' === $ post_id ;
130- $ this ->asset_data_registry ->add ( 'is_archive_product_template ' , $ is_archive_product_template , true );
131- }
132-
133116 /**
134117 * Update the query for the product query block in Editor.
135118 *
You can’t perform that action at this time.
0 commit comments