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

Commit

Permalink
Merge branch 'trunk' into 11235/fix-white-space
Browse files Browse the repository at this point in the history
  • Loading branch information
albarin authored Oct 18, 2023
2 parents f0dac9a + 0318adb commit 2793b43
Show file tree
Hide file tree
Showing 18 changed files with 3 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __, sprintf } from '@wordpress/i18n';
import LoadingMask from '@woocommerce/base-components/loading-mask';
import { RemovableChip } from '@woocommerce/base-components/chip';
import { RemovableChip } from '@woocommerce/blocks-components';
import { applyCheckoutFilter, TotalsItem } from '@woocommerce/blocks-checkout';
import { getSetting } from '@woocommerce/settings';
import {
Expand Down
1 change: 0 additions & 1 deletion assets/js/base/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export * from './block-error-boundary';
export * from './button';
export * from './cart-checkout';
export * from './chip';
export * from './combobox';
export * from './country-input';
export * from './drawer';
Expand Down
2 changes: 1 addition & 1 deletion assets/js/blocks/active-filters/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __, sprintf } from '@wordpress/i18n';
import { formatPrice } from '@woocommerce/price-format';
import { RemovableChip } from '@woocommerce/base-components/chip';
import { RemovableChip } from '@woocommerce/blocks-components';
import Label from '@woocommerce/base-components/label';
import { getQueryArgs, addQueryArgs, removeQueryArgs } from '@wordpress/url';
import { changeUrl } from '@woocommerce/utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const mapAttributes = ( attributes ) => {
woocommerceOnSale,
woocommerceHandPickedProducts,
taxQuery,
parents,
isProductCollectionBlock,
...restQuery
} = query;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ const mapAttributes = ( attributes: Record< string, unknown > ) => {
woocommerceOnSale: __woocommerceOnSale,
woocommerceHandPickedProducts: include,
taxQuery: {},
parents: [],
isProductCollectionBlock: true,
...restQuery,
},
Expand Down
2 changes: 0 additions & 2 deletions assets/js/blocks/product-collection/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ export const DEFAULT_QUERY: ProductCollectionQuery = {
author: '',
search: '',
exclude: [],
sticky: '',
inherit: null,
taxQuery: {},
parents: [],
isProductCollectionBlock: true,
woocommerceOnSale: false,
woocommerceStockStatus: getDefaultStockStatuses(),
Expand Down
2 changes: 0 additions & 2 deletions assets/js/blocks/product-collection/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ export interface ProductCollectionQuery {
order: TProductCollectionOrder;
orderBy: TProductCollectionOrderBy;
pages: number;
parents: number[];
perPage: number;
postType: string;
search: string;
sticky: string;
taxQuery: Record< string, number[] >;
woocommerceOnSale: boolean;
/**
Expand Down
13 changes: 0 additions & 13 deletions assets/js/blocks/product-template/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,8 @@ const ProductTemplateEdit = ( {
author,
search,
exclude,
sticky,
inherit,
taxQuery,
parents,
pages,
...restQueryArgs
},
Expand Down Expand Up @@ -165,15 +163,6 @@ const ProductTemplateEdit = ( {
if ( exclude?.length ) {
query.exclude = exclude;
}
if ( parents?.length ) {
query.parent = parents;
}
// If sticky is not set, it will return all products in the results.
// If sticky is set to `only`, it will limit the results to sticky products only.
// If it is anything else, it will exclude sticky products from results. For the record the value stored is `exclude`.
if ( sticky ) {
query.sticky = sticky === 'only';
}
// If `inherit` is truthy, adjust conditionally the query to create a better preview.
if ( inherit ) {
if ( templateCategory ) {
Expand All @@ -200,11 +189,9 @@ const ProductTemplateEdit = ( {
search,
postType,
exclude,
sticky,
inherit,
templateSlug,
taxQuery,
parents,
restQueryArgs,
]
);
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions packages/components/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default as CheckboxList } from './checkbox-list';
export { Chip, RemovableChip } from './chip';
1 change: 0 additions & 1 deletion src/BlockTypes/CollectionFilters.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ function( $key ) use ( $query, &$params ) {
$mapped_params = array(
'orderBy' => 'orderby',
'pages' => 'page',
'parents' => 'parent',
'perPage' => 'per_page',
'woocommerceStockStatus' => 'stock_status',
'woocommerceOnSale' => 'on_sale',
Expand Down

0 comments on commit 2793b43

Please sign in to comment.