Merge branch 'trunk' into feature/34906-marketing-channels-card

This commit is contained in:
Gan Eng Chin 2023-02-04 02:33:01 +08:00
commit b717ce9645
No known key found for this signature in database
GPG Key ID: 94D5D972860ADB01
22 changed files with 3012 additions and 2683 deletions

View File

@ -9,7 +9,6 @@ import {
__experimentalSelectControlMenuSlot as SelectControlMenuSlot,
Link,
} from '@woocommerce/components';
import { recordEvent } from '@woocommerce/tracks';
import interpolateComponents from '@automattic/interpolate-components';
import { getAdminLink } from '@woocommerce/settings';
@ -17,48 +16,69 @@ import { getAdminLink } from '@woocommerce/settings';
* Internal dependencies
*/
import './attribute-field.scss';
import { AddAttributeModal } from './add-attribute-modal';
import { EditAttributeModal } from './edit-attribute-modal';
import { EnhancedProductAttribute } from '~/products/hooks/use-product-attributes';
import {
getAttributeId,
getAttributeKey,
reorderSortableProductAttributePositions,
} from './utils';
import { AttributeEmptyState } from '../attribute-empty-state';
import {
AddAttributeListItem,
AttributeListItem,
NewAttributeListItem,
} from '../attribute-list-item';
import { NewAttributeModal } from './new-attribute-modal';
type AttributeControlProps = {
value: ProductAttribute[];
onAdd?: ( attribute: EnhancedProductAttribute[] ) => void;
onChange: ( value: ProductAttribute[] ) => void;
// TODO: should we support an 'any' option to show all attributes?
attributeType?: 'regular' | 'for-variations';
onEdit?: ( attribute: ProductAttribute ) => void;
onRemove?: ( attribute: ProductAttribute ) => void;
onRemoveCancel?: ( attribute: ProductAttribute ) => void;
onNewModalCancel?: () => void;
onNewModalClose?: () => void;
onNewModalOpen?: () => void;
onEditModalCancel?: ( attribute?: ProductAttribute ) => void;
onEditModalClose?: ( attribute?: ProductAttribute ) => void;
onEditModalOpen?: ( attribute?: ProductAttribute ) => void;
uiStrings?: {
emptyStateSubtitle?: string;
newAttributeListItemLabel?: string;
newAttributeModalTitle?: string;
globalAttributeHelperMessage: string;
};
};
export const AttributeControl: React.FC< AttributeControlProps > = ( {
value,
attributeType = 'regular',
onAdd = () => {},
onChange,
onEdit = () => {},
onNewModalCancel = () => {},
onNewModalClose = () => {},
onNewModalOpen = () => {},
onEditModalCancel = () => {},
onEditModalClose = () => {},
onEditModalOpen = () => {},
onRemove = () => {},
onRemoveCancel = () => {},
uiStrings = {
newAttributeModalTitle: undefined,
emptyStateSubtitle: undefined,
newAttributeListItemLabel: undefined,
globalAttributeHelperMessage: __(
`You can change the attribute's name in {{link}}Attributes{{/link}}.`,
'woocommerce'
),
},
} ) => {
const [ showAddAttributeModal, setShowAddAttributeModal ] =
useState( false );
const [ editingAttributeId, setEditingAttributeId ] = useState<
const [ isNewModalVisible, setIsNewModalVisible ] = useState( false );
const [ currentAttributeId, setCurrentAttributeId ] = useState<
null | string
>( null );
const isOnlyForVariations = attributeType === 'for-variations';
const newAttributeProps = { variation: isOnlyForVariations };
const CANCEL_BUTTON_EVENT_NAME = isOnlyForVariations
? 'product_add_options_modal_cancel_button_click'
: 'product_add_attributes_modal_cancel_button_click';
const fetchAttributeId = ( attribute: { id: number; name: string } ) =>
`${ attribute.id }-${ attribute.name }`;
const handleChange = ( newAttributes: EnhancedProductAttribute[] ) => {
onChange(
newAttributes.map( ( attr ) => {
@ -74,79 +94,89 @@ export const AttributeControl: React.FC< AttributeControlProps > = ( {
);
};
const onRemove = ( attribute: ProductAttribute ) => {
const handleRemove = ( attribute: ProductAttribute ) => {
// eslint-disable-next-line no-alert
if ( window.confirm( __( 'Remove this attribute?', 'woocommerce' ) ) ) {
recordEvent(
'product_remove_attribute_confirmation_confirm_click'
);
handleChange(
value.filter(
( attr ) =>
fetchAttributeId( attr ) !==
fetchAttributeId( attribute )
getAttributeId( attr ) !== getAttributeId( attribute )
)
);
} else {
recordEvent( 'product_remove_attribute_confirmation_cancel_click' );
onRemove( attribute );
return;
}
onRemoveCancel( attribute );
};
const onAddNewAttributes = (
newAttributes: EnhancedProductAttribute[]
) => {
handleChange( [
...( value || [] ),
...newAttributes
.filter(
( newAttr ) =>
! ( value || [] ).find( ( attr ) =>
newAttr.id === 0
? newAttr.name === attr.name // check name if custom attribute = id === 0.
: attr.id === newAttr.id
)
)
.map( ( newAttr, index ) => {
return {
...newAttributeProps,
...newAttr,
position: ( value || [] ).length + index,
const openNewModal = () => {
setIsNewModalVisible( true );
onNewModalOpen();
};
} ),
const closeNewModal = () => {
setIsNewModalVisible( false );
onNewModalClose();
};
const openEditModal = ( attribute: ProductAttribute ) => {
setCurrentAttributeId( getAttributeId( attribute ) );
onEditModalOpen( attribute );
};
const closeEditModal = ( attribute: ProductAttribute ) => {
setCurrentAttributeId( null );
onEditModalClose( attribute );
};
const handleAdd = ( newAttributes: EnhancedProductAttribute[] ) => {
handleChange( [
...value,
...newAttributes.filter(
( newAttr ) =>
! value.find(
( attr ) =>
getAttributeId( newAttr ) === getAttributeId( attr )
)
),
] );
recordEvent( 'product_add_attributes_modal_add_button_click' );
setShowAddAttributeModal( false );
onAdd( newAttributes );
closeNewModal();
};
const handleEdit = ( updatedAttribute: ProductAttribute ) => {
const updatedAttributes = value.map( ( attr ) => {
if (
getAttributeId( attr ) === getAttributeId( updatedAttribute )
) {
return updatedAttribute;
}
return attr;
} );
onEdit( updatedAttribute );
handleChange( updatedAttributes );
closeEditModal( updatedAttribute );
};
if ( ! value.length ) {
return (
<>
<AttributeEmptyState
addNewLabel={
isOnlyForVariations
? __( 'Add options', 'woocommerce' )
: undefined
}
onNewClick={ () => {
recordEvent(
'product_add_first_attribute_button_click'
);
setShowAddAttributeModal( true );
} }
subtitle={
isOnlyForVariations
? __( 'No options yet', 'woocommerce' )
: undefined
}
addNewLabel={ uiStrings.newAttributeModalTitle }
onNewClick={ () => openNewModal() }
subtitle={ uiStrings.emptyStateSubtitle }
/>
{ showAddAttributeModal && (
<AddAttributeModal
{ isNewModalVisible && (
<NewAttributeModal
onCancel={ () => {
recordEvent( CANCEL_BUTTON_EVENT_NAME );
setShowAddAttributeModal( false );
closeNewModal();
onNewModalCancel();
} }
onAdd={ onAddNewAttributes }
onAdd={ handleAdd }
selectedAttributeIds={ [] }
title={ uiStrings.newAttributeModalTitle }
/>
) }
<SelectControlMenuSlot />
@ -167,20 +197,10 @@ export const AttributeControl: React.FC< AttributeControlProps > = ( {
{} as Record< number | string, ProductAttribute >
);
const editingAttribute = value.find(
( attr ) => fetchAttributeId( attr ) === editingAttributeId
const currentAttribute = value.find(
( attr ) => getAttributeId( attr ) === currentAttributeId
) as EnhancedProductAttribute;
const editAttributeCopy = isOnlyForVariations
? __(
`You can change the option's name in {{link}}Attributes{{/link}}.`,
'woocommerce'
)
: __(
`You can change the attribute's name in {{link}}Attributes{{/link}}.`,
'woocommerce'
);
return (
<div className="woocommerce-attribute-field">
<Sortable
@ -204,54 +224,37 @@ export const AttributeControl: React.FC< AttributeControlProps > = ( {
{ sortedAttributes.map( ( attr ) => (
<AttributeListItem
attribute={ attr }
key={ fetchAttributeId( attr ) }
onEditClick={ () =>
setEditingAttributeId( fetchAttributeId( attr ) )
}
onRemoveClick={ () => onRemove( attr ) }
key={ getAttributeId( attr ) }
onEditClick={ () => openEditModal( attr ) }
onRemoveClick={ () => handleRemove( attr ) }
/>
) ) }
</Sortable>
<AddAttributeListItem
label={
isOnlyForVariations
? __( 'Add option', 'woocommerce' )
: undefined
}
onAddClick={ () => {
recordEvent(
isOnlyForVariations
? 'product_add_option_button'
: 'product_add_attribute_button'
);
setShowAddAttributeModal( true );
} }
<NewAttributeListItem
label={ uiStrings.newAttributeListItemLabel }
onClick={ () => openNewModal() }
/>
{ showAddAttributeModal && (
<AddAttributeModal
title={
isOnlyForVariations
? __( 'Add options', 'woocommerce' )
: undefined
}
{ isNewModalVisible && (
<NewAttributeModal
title={ uiStrings.newAttributeModalTitle }
onCancel={ () => {
recordEvent( CANCEL_BUTTON_EVENT_NAME );
setShowAddAttributeModal( false );
closeNewModal();
onNewModalCancel();
} }
onAdd={ onAddNewAttributes }
onAdd={ handleAdd }
selectedAttributeIds={ value.map( ( attr ) => attr.id ) }
/>
) }
<SelectControlMenuSlot />
{ editingAttribute && (
{ currentAttribute && (
<EditAttributeModal
title={ sprintf(
/* translators: %s is the attribute name */
__( 'Edit %s', 'woocommerce' ),
editingAttribute.name
currentAttribute.name
) }
globalAttributeHelperMessage={ interpolateComponents( {
mixedString: editAttributeCopy,
mixedString: uiStrings.globalAttributeHelperMessage,
components: {
link: (
<Link
@ -266,26 +269,14 @@ export const AttributeControl: React.FC< AttributeControlProps > = ( {
),
},
} ) }
onCancel={ () => setEditingAttributeId( null ) }
onEdit={ ( changedAttribute ) => {
const newAttributesSet = [ ...value ];
const changedAttributeIndex: number =
newAttributesSet.findIndex( ( attr ) =>
attr.id !== 0
? attr.id === changedAttribute.id
: attr.name === changedAttribute.name
);
newAttributesSet.splice(
changedAttributeIndex,
1,
changedAttribute
);
handleChange( newAttributesSet );
setEditingAttributeId( null );
onCancel={ () => {
closeEditModal( currentAttribute );
onEditModalCancel( currentAttribute );
} }
attribute={ editingAttribute }
onEdit={ ( updatedAttribute ) => {
handleEdit( updatedAttribute );
} }
attribute={ currentAttribute }
/>
) }
</div>

View File

@ -1,5 +1,13 @@
.woocommerce-edit-attribute-modal {
overflow: visible;
&__buttons {
margin-top: $gap-larger;
display: flex;
flex-direction: row;
gap: $gap-smaller;
justify-content: flex-end;
}
}
.woocommerce-edit-attribute-modal__body {

View File

@ -136,7 +136,7 @@ export const EditAttributeModal: React.FC< EditAttributeModalProps > = ( {
<Tooltip text={ visibleTooltip } />
</div>
</div>
<div className="woocommerce-add-attribute-modal__buttons">
<div className="woocommerce-edit-attribute-modal__buttons">
<Button
isSecondary
label={ cancelAccessibleLabel }

View File

@ -1,4 +1,4 @@
.woocommerce-add-attribute-modal {
.woocommerce-new-attribute-modal {
.components-notice.is-info {
margin-left: 0;
margin-right: 0;

View File

@ -20,7 +20,7 @@ import {
/**
* Internal dependencies
*/
import './add-attribute-modal.scss';
import './new-attribute-modal.scss';
import { AttributeInputField } from '../attribute-input-field';
import {
AttributeTermInputField,
@ -29,7 +29,7 @@ import {
import { EnhancedProductAttribute } from '~/products/hooks/use-product-attributes';
import { getProductAttributeObject } from './utils';
type AddAttributeModalProps = {
type NewAttributeModalProps = {
title?: string;
notice?: string;
attributeLabel?: string;
@ -54,7 +54,7 @@ type AttributeForm = {
attributes: Array< EnhancedProductAttribute | null >;
};
export const AddAttributeModal: React.FC< AddAttributeModalProps > = ( {
export const NewAttributeModal: React.FC< NewAttributeModalProps > = ( {
title = __( 'Add attributes', 'woocommerce' ),
notice = __(
'By default, attributes are filterable and visible on the product page. You can change these settings for each attribute separately later.',
@ -83,12 +83,11 @@ export const AddAttributeModal: React.FC< AddAttributeModalProps > = ( {
const scrollAttributeIntoView = ( index: number ) => {
setTimeout( () => {
const attributeRow = document.querySelector(
`.woocommerce-add-attribute-modal__table-row-${ index }`
`.woocommerce-new-attribute-modal__table-row-${ index }`
);
attributeRow?.scrollIntoView( { behavior: 'smooth' } );
}, 0 );
};
const [ showConfirmClose, setShowConfirmClose ] = useState( false );
const addAnother = (
values: AttributeForm,
@ -148,9 +147,9 @@ export const AddAttributeModal: React.FC< AddAttributeModalProps > = ( {
setTimeout( () => {
const valueInputField: HTMLInputElement | null =
document.querySelector(
'.woocommerce-add-attribute-modal__table-row-' +
'.woocommerce-new-attribute-modal__table-row-' +
index +
' .woocommerce-add-attribute-modal__table-attribute-value-column .woocommerce-experimental-select-control__input'
' .woocommerce-new-attribute-modal__table-attribute-value-column .woocommerce-experimental-select-control__input'
);
if ( valueInputField ) {
valueInputField.focus();
@ -198,16 +197,16 @@ export const AddAttributeModal: React.FC< AddAttributeModalProps > = ( {
onClose( values );
}
} }
className="woocommerce-add-attribute-modal"
className="woocommerce-new-attribute-modal"
>
<Notice isDismissible={ false }>
<p>{ notice }</p>
</Notice>
<div className="woocommerce-add-attribute-modal__body">
<table className="woocommerce-add-attribute-modal__table">
<div className="woocommerce-new-attribute-modal__body">
<table className="woocommerce-new-attribute-modal__table">
<thead>
<tr className="woocommerce-add-attribute-modal__table-header">
<tr className="woocommerce-new-attribute-modal__table-header">
<th>{ attributeLabel }</th>
<th>{ valueLabel }</th>
</tr>
@ -217,9 +216,9 @@ export const AddAttributeModal: React.FC< AddAttributeModalProps > = ( {
( attribute, index ) => (
<tr
key={ index }
className={ `woocommerce-add-attribute-modal__table-row woocommerce-add-attribute-modal__table-row-${ index }` }
className={ `woocommerce-new-attribute-modal__table-row woocommerce-new-attribute-modal__table-row-${ index }` }
>
<td className="woocommerce-add-attribute-modal__table-attribute-column">
<td className="woocommerce-new-attribute-modal__table-attribute-column">
<AttributeInputField
placeholder={
attributePlaceholder
@ -265,7 +264,7 @@ export const AddAttributeModal: React.FC< AddAttributeModalProps > = ( {
] }
/>
</td>
<td className="woocommerce-add-attribute-modal__table-attribute-value-column">
<td className="woocommerce-new-attribute-modal__table-attribute-value-column">
{ attribute === null ||
attribute.id !== 0 ? (
<AttributeTermInputField
@ -329,7 +328,7 @@ export const AddAttributeModal: React.FC< AddAttributeModalProps > = ( {
/>
) }
</td>
<td className="woocommerce-add-attribute-modal__table-attribute-trash-column">
<td className="woocommerce-new-attribute-modal__table-attribute-trash-column">
<Button
icon={ trash }
disabled={
@ -361,7 +360,7 @@ export const AddAttributeModal: React.FC< AddAttributeModalProps > = ( {
</div>
<div>
<Button
className="woocommerce-add-attribute-modal__add-attribute"
className="woocommerce-new-attribute-modal__add-attribute"
variant="tertiary"
label={ addAnotherAccessibleLabel }
onClick={ () => {
@ -374,7 +373,7 @@ export const AddAttributeModal: React.FC< AddAttributeModalProps > = ( {
{ addAnotherLabel }
</Button>
</div>
<div className="woocommerce-add-attribute-modal__buttons">
<div className="woocommerce-new-attribute-modal__buttons">
<Button
isSecondary
label={ cancelLabel }

View File

@ -144,7 +144,6 @@ describe( 'AttributeControl', () => {
<AttributeControl
value={ [ ...attributeList ] }
onChange={ () => {} }
attributeType="for-variations"
/>
);
} );

View File

@ -7,7 +7,7 @@ import { ProductAttribute, ProductAttributeTerm } from '@woocommerce/data';
/**
* Internal dependencies
*/
import { AddAttributeModal } from '../add-attribute-modal';
import { NewAttributeModal } from '../new-attribute-modal';
let attributeOnChange: ( val: ProductAttribute ) => void;
jest.mock( '../../attribute-input-field', () => ( {
@ -118,14 +118,14 @@ const attributeTermList: ProductAttributeTerm[] = [
},
];
describe( 'AddAttributeModal', () => {
describe( 'NewAttributeModal', () => {
beforeEach( () => {
jest.clearAllMocks();
} );
it( 'should render at-least one row with the attribute dropdown fields', () => {
const { queryAllByText } = render(
<AddAttributeModal
<NewAttributeModal
onCancel={ () => {} }
onAdd={ () => {} }
selectedAttributeIds={ [] }
@ -139,7 +139,7 @@ describe( 'AddAttributeModal', () => {
it( 'should enable attribute term field once attribute is selected', () => {
const { queryAllByText } = render(
<AddAttributeModal
<NewAttributeModal
onCancel={ () => {} }
onAdd={ () => {} }
selectedAttributeIds={ [] }
@ -155,7 +155,7 @@ describe( 'AddAttributeModal', () => {
it( 'should allow us to add multiple new rows with the attribute fields', () => {
const { queryAllByText, queryByRole } = render(
<AddAttributeModal
<NewAttributeModal
onCancel={ () => {} }
onAdd={ () => {} }
selectedAttributeIds={ [] }
@ -175,7 +175,7 @@ describe( 'AddAttributeModal', () => {
it( 'should allow us to remove the added fields', () => {
const { queryAllByText, queryByRole, queryAllByLabelText } = render(
<AddAttributeModal
<NewAttributeModal
onCancel={ () => {} }
onAdd={ () => {} }
selectedAttributeIds={ [] }
@ -201,7 +201,7 @@ describe( 'AddAttributeModal', () => {
it( 'should not allow us to remove all the rows', () => {
const { queryAllByText, queryAllByLabelText } = render(
<AddAttributeModal
<NewAttributeModal
onCancel={ () => {} }
onAdd={ () => {} }
selectedAttributeIds={ [] }
@ -221,7 +221,7 @@ describe( 'AddAttributeModal', () => {
it( 'should not return empty attribute rows', () => {
const onAddMock = jest.fn();
const { queryAllByText, queryByLabelText, queryByRole } = render(
<AddAttributeModal
<NewAttributeModal
onCancel={ () => {} }
onAdd={ onAddMock }
selectedAttributeIds={ [] }
@ -247,7 +247,7 @@ describe( 'AddAttributeModal', () => {
it( 'should not add attribute if no terms were selected', () => {
const onAddMock = jest.fn();
const { queryByRole } = render(
<AddAttributeModal
<NewAttributeModal
onCancel={ () => {} }
onAdd={ onAddMock }
selectedAttributeIds={ [] }
@ -265,7 +265,7 @@ describe( 'AddAttributeModal', () => {
it( 'should add attribute with array of terms', () => {
const onAddMock = jest.fn();
const { queryByRole } = render(
<AddAttributeModal
<NewAttributeModal
onCancel={ () => {} }
onAdd={ onAddMock }
selectedAttributeIds={ [] }

View File

@ -15,6 +15,15 @@ export function getAttributeKey(
return attribute.id !== 0 ? attribute.id : attribute.name;
}
/**
* Get an attribute ID that works universally across global and local attributes.
*
* @param attribute Product attribute.
* @return string
*/
export const getAttributeId = ( attribute: ProductAttribute ) =>
`${ attribute.id }-${ attribute.name }`;
/**
* Updates the position of a product attribute from the new items list.
*

View File

@ -2,25 +2,24 @@
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { DragEventHandler } from 'react';
import { Button } from '@wordpress/components';
import { ListItem } from '@woocommerce/components';
type AddAttributeListItemProps = {
type NewAttributeListItemProps = {
label?: string;
onAddClick?: () => void;
onClick?: () => void;
};
export const AddAttributeListItem: React.FC< AddAttributeListItemProps > = ( {
export const NewAttributeListItem: React.FC< NewAttributeListItemProps > = ( {
label = __( 'Add attribute', 'woocommerce' ),
onAddClick,
onClick,
} ) => {
return (
<ListItem className="woocommerce-add-attribute-list-item">
<Button
variant="secondary"
className="woocommerce-add-attribute-list-item__add-button"
onClick={ onAddClick }
onClick={ onClick }
>
{ label }
</Button>

View File

@ -2,6 +2,7 @@
* External dependencies
*/
import { ProductAttribute } from '@woocommerce/data';
import { recordEvent } from '@woocommerce/tracks';
/**
* Internal dependencies
@ -28,9 +29,33 @@ export const Attributes: React.FC< AttributesProps > = ( {
return (
<AttributeControl
attributeType="regular"
value={ attributes }
onAdd={ () => {
recordEvent( 'product_add_attributes_modal_add_button_click' );
} }
onChange={ handleChange }
onNewModalCancel={ () => {
recordEvent(
'product_add_attributes_modal_cancel_button_click'
);
} }
onNewModalOpen={ () => {
if ( ! attributes.length ) {
recordEvent( 'product_add_first_attribute_button_click' );
return;
}
recordEvent( 'product_add_attribute_button' );
} }
onRemove={ () =>
recordEvent(
'product_remove_attribute_confirmation_confirm_click'
)
}
onRemoveCancel={ () =>
recordEvent(
'product_remove_attribute_confirmation_cancel_click'
)
}
/>
);
};

View File

@ -1,7 +1,9 @@
/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { Product, ProductAttribute } from '@woocommerce/data';
import { recordEvent } from '@woocommerce/tracks';
import { useFormContext } from '@woocommerce/components';
/**
@ -40,9 +42,38 @@ export const Options: React.FC< OptionsProps > = ( {
return (
<AttributeControl
attributeType="for-variations"
value={ attributes }
onAdd={ () => {
recordEvent( 'product_add_options_modal_add_button_click' );
} }
onChange={ handleChange }
onNewModalCancel={ () => {
recordEvent( 'product_add_options_modal_cancel_button_click' );
} }
onNewModalOpen={ () => {
if ( ! attributes.length ) {
recordEvent( 'product_add_first_option_button_click' );
return;
}
recordEvent( 'product_add_option_button' );
} }
uiStrings={ {
emptyStateSubtitle: __( 'No options yet', 'woocommerce' ),
newAttributeListItemLabel: __( 'Add option', 'woocommerce' ),
newAttributeModalTitle: __( 'Add options', 'woocommerce' ),
globalAttributeHelperMessage: __(
`You can change the option's name in {{link}}Attributes{{/link}}.`,
'woocommerce'
),
} }
onRemove={ () =>
recordEvent(
'product_remove_option_confirmation_confirm_click'
)
}
onRemoveCancel={ () =>
recordEvent( 'product_remove_option_confirmation_cancel_click' )
}
/>
);
};

View File

@ -78,12 +78,21 @@ export function useProductAttributes( {
};
};
const getAugmentedAttributes = ( atts: ProductAttribute[] ) => {
return atts.map( ( attribute, index ) => ( {
...attribute,
variation: isVariationAttributes,
position: attributes.length + index,
} ) );
};
const handleChange = ( newAttributes: ProductAttribute[] ) => {
const augmentedAttributes = getAugmentedAttributes( newAttributes );
const otherAttributes = isVariationAttributes
? allAttributes.filter( ( attribute ) => ! attribute.variation )
: allAttributes.filter( ( attribute ) => !! attribute.variation );
setAttributes( newAttributes );
onChange( [ ...otherAttributes, ...newAttributes ] );
setAttributes( augmentedAttributes );
onChange( [ ...otherAttributes, ...augmentedAttributes ] );
};
useEffect( () => {

View File

@ -0,0 +1,4 @@
Significance: minor
Type: tweak
Add IR and fields priorities to list of get_country_locale() method to follow conventional way of addressing in Iran.

View File

@ -0,0 +1,4 @@
Significance: patch
Type: enhancement
Change the sass variable names to more predictable ones.

View File

@ -0,0 +1,4 @@
Significance: minor
Type: dev
Remove attribute type logic from attribute component

View File

@ -0,0 +1,5 @@
Significance: patch
Type: update
Comment: Mark purchase tests skipped temporarily due to a change in the endpoint behavior

View File

@ -0,0 +1,4 @@
Significance: patch
Type: update
Update woocommerce-blocks to 9.4.3.

View File

@ -293,7 +293,7 @@
}
mark.yes {
color: $green;
color: var(--wc-green);
}
mark.no {

View File

@ -21,7 +21,7 @@
"maxmind-db/reader": "^1.11",
"pelago/emogrifier": "^6.0",
"woocommerce/action-scheduler": "3.5.4",
"woocommerce/woocommerce-blocks": "9.4.2"
"woocommerce/woocommerce-blocks": "9.4.3"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.0",

View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "6fe58874ca65c9b5a5540183f66a09b8",
"content-hash": "1c61abfc7c6c9b7795d2c18201e29f08",
"packages": [
{
"name": "automattic/jetpack-autoloader",
@ -42,10 +42,14 @@
"psr-4": {
"Automattic\\Jetpack\\Autoloader\\": "src"
},
"classmap": [ "src/AutoloadGenerator.php" ]
"classmap": [
"src/AutoloadGenerator.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "GPL-2.0-or-later" ],
"license": [
"GPL-2.0-or-later"
],
"description": "Creates a custom autoloader for a plugin or theme.",
"support": {
"source": "https://github.com/Automattic/jetpack-autoloader/tree/2.10.1"
@ -72,10 +76,14 @@
},
"type": "library",
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "GPL-2.0-or-later" ],
"license": [
"GPL-2.0-or-later"
],
"description": "A wrapper for defining constants in a more testable way.",
"support": {
"source": "https://github.com/Automattic/jetpack-constants/tree/v1.5.1"
@ -124,7 +132,9 @@
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "MIT" ],
"license": [
"MIT"
],
"authors": [
{
"name": "Kyle Robinson Young",
@ -271,7 +281,9 @@
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "Apache-2.0" ],
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "Gregory J. Oschwald",
@ -332,7 +344,9 @@
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "MIT" ],
"license": [
"MIT"
],
"authors": [
{
"name": "Oliver Klee",
@ -359,7 +373,11 @@
],
"description": "Converts CSS styles into inline style attributes in your HTML code",
"homepage": "https://www.myintervals.com/emogrifier.php",
"keywords": [ "css", "email", "pre-processing" ],
"keywords": [
"css",
"email",
"pre-processing"
],
"support": {
"issues": "https://github.com/MyIntervals/emogrifier/issues",
"source": "https://github.com/MyIntervals/emogrifier"
@ -398,7 +416,9 @@
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "MIT" ],
"license": [
"MIT"
],
"authors": [
{
"name": "Raphael Schweikert"
@ -406,7 +426,11 @@
],
"description": "Parser for CSS Files written in PHP",
"homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser",
"keywords": [ "css", "parser", "stylesheet" ],
"keywords": [
"css",
"parser",
"stylesheet"
],
"support": {
"issues": "https://github.com/sabberworm/PHP-CSS-Parser/issues",
"source": "https://github.com/sabberworm/PHP-CSS-Parser/tree/8.4.0"
@ -436,10 +460,14 @@
"psr-4": {
"Symfony\\Component\\CssSelector\\": ""
},
"exclude-from-classmap": [ "/Tests/" ]
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "MIT" ],
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
@ -503,14 +531,20 @@
}
},
"autoload": {
"files": [ "bootstrap.php" ],
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"classmap": [ "Resources/stubs" ]
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "MIT" ],
"license": [
"MIT"
],
"authors": [
{
"name": "Ion Bazan",
@ -527,7 +561,12 @@
],
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [ "compatibility", "polyfill", "portable", "shim" ],
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0"
},
@ -576,7 +615,9 @@
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "GPL-3.0-or-later" ],
"license": [
"GPL-3.0-or-later"
],
"description": "Action Scheduler for WordPress and WooCommerce",
"homepage": "https://actionscheduler.org/",
"support": {
@ -587,16 +628,16 @@
},
{
"name": "woocommerce/woocommerce-blocks",
"version": "v9.4.2",
"version": "v9.4.3",
"source": {
"type": "git",
"url": "https://github.com/woocommerce/woocommerce-blocks.git",
"reference": "1b1bb3acb6814391ee94b7aa01bff9b23a2c9184"
"reference": "26feae05d65ff38f0277bdb0c19f9d293d3cbfc4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/woocommerce/woocommerce-blocks/zipball/1b1bb3acb6814391ee94b7aa01bff9b23a2c9184",
"reference": "1b1bb3acb6814391ee94b7aa01bff9b23a2c9184",
"url": "https://api.github.com/repos/woocommerce/woocommerce-blocks/zipball/26feae05d65ff38f0277bdb0c19f9d293d3cbfc4",
"reference": "26feae05d65ff38f0277bdb0c19f9d293d3cbfc4",
"shasum": ""
},
"require": {
@ -630,15 +671,21 @@
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "GPL-3.0-or-later" ],
"license": [
"GPL-3.0-or-later"
],
"description": "WooCommerce blocks for the Gutenberg editor.",
"homepage": "https://woocommerce.com/",
"keywords": [ "blocks", "gutenberg", "woocommerce" ],
"keywords": [
"blocks",
"gutenberg",
"woocommerce"
],
"support": {
"issues": "https://github.com/woocommerce/woocommerce-blocks/issues",
"source": "https://github.com/woocommerce/woocommerce-blocks/tree/v9.4.2"
"source": "https://github.com/woocommerce/woocommerce-blocks/tree/v9.4.3"
},
"time": "2023-01-26T14:46:25+00:00"
"time": "2023-02-02T10:50:45+00:00"
}
],
"packages-dev": [
@ -666,7 +713,9 @@
"wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
"yoast/phpunit-polyfills": "1.0.4"
},
"bin": [ "bin/changelogger" ],
"bin": [
"bin/changelogger"
],
"type": "project",
"extra": {
"autotagger": true,
@ -688,7 +737,9 @@
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "GPL-2.0-or-later" ],
"license": [
"GPL-2.0-or-later"
],
"description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
"support": {
"source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
@ -727,7 +778,9 @@
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "MIT" ],
"license": [
"MIT"
],
"description": "No conflicts for your bin dependencies",
"keywords": [
"composer",
@ -767,10 +820,14 @@
},
"type": "library",
"autoload": {
"files": [ "assertarraysubset-autoload.php" ]
"files": [
"assertarraysubset-autoload.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "MIT" ],
"license": [
"MIT"
],
"authors": [
{
"name": "Rafael Dohms",
@ -818,7 +875,9 @@
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "MIT" ],
"license": [
"MIT"
],
"authors": [
{
"name": "Marco Pivetta",
@ -828,7 +887,10 @@
],
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
"homepage": "https://www.doctrine-project.org/projects/instantiator.html",
"keywords": [ "constructor", "instantiate" ],
"keywords": [
"constructor",
"instantiate"
],
"support": {
"issues": "https://github.com/doctrine/instantiator/issues",
"source": "https://github.com/doctrine/instantiator/tree/1.5.0"
@ -877,13 +939,17 @@
},
"type": "library",
"autoload": {
"files": [ "src/DeepCopy/deep_copy.php" ],
"files": [
"src/DeepCopy/deep_copy.php"
],
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "MIT" ],
"license": [
"MIT"
],
"description": "Create deep copies (clones) of your objects",
"keywords": [
"clone",
@ -932,10 +998,14 @@
}
},
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Arne Blankerts",
@ -979,10 +1049,14 @@
},
"type": "library",
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Arne Blankerts",
@ -1046,10 +1120,14 @@
}
},
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
@ -1059,7 +1137,11 @@
],
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
"homepage": "https://github.com/sebastianbergmann/php-code-coverage",
"keywords": [ "coverage", "testing", "xunit" ],
"keywords": [
"coverage",
"testing",
"xunit"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15"
@ -1099,10 +1181,14 @@
}
},
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
@ -1112,7 +1198,10 @@
],
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
"homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
"keywords": [ "filesystem", "iterator" ],
"keywords": [
"filesystem",
"iterator"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
"source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.5"
@ -1144,10 +1233,14 @@
},
"type": "library",
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
@ -1157,7 +1250,9 @@
],
"description": "Simple template engine.",
"homepage": "https://github.com/sebastianbergmann/php-text-template/",
"keywords": [ "template" ],
"keywords": [
"template"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-text-template/issues",
"source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1"
@ -1191,10 +1286,14 @@
}
},
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
@ -1204,7 +1303,9 @@
],
"description": "Utility class for timing",
"homepage": "https://github.com/sebastianbergmann/php-timer/",
"keywords": [ "timer" ],
"keywords": [
"timer"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-timer/issues",
"source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3"
@ -1245,10 +1346,14 @@
}
},
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
@ -1257,7 +1362,9 @@
],
"description": "Wrapper around PHP's tokenizer extension.",
"homepage": "https://github.com/sebastianbergmann/php-token-stream/",
"keywords": [ "tokenizer" ],
"keywords": [
"tokenizer"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-token-stream/issues",
"source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.3"
@ -1316,7 +1423,9 @@
"ext-xdebug": "*",
"phpunit/php-invoker": "^2.0.0"
},
"bin": [ "phpunit" ],
"bin": [
"phpunit"
],
"type": "library",
"extra": {
"branch-alias": {
@ -1324,10 +1433,14 @@
}
},
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
@ -1337,7 +1450,11 @@
],
"description": "The PHP Unit Testing framework.",
"homepage": "https://phpunit.de/",
"keywords": [ "phpunit", "testing", "xunit" ],
"keywords": [
"phpunit",
"testing",
"xunit"
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.29"
@ -1383,7 +1500,9 @@
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "MIT" ],
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
@ -1392,7 +1511,11 @@
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [ "log", "psr", "psr-3" ],
"keywords": [
"log",
"psr",
"psr-3"
],
"support": {
"source": "https://github.com/php-fig/log/tree/1.1.4"
},
@ -1425,10 +1548,14 @@
}
},
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
@ -1478,10 +1605,14 @@
}
},
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
@ -1502,7 +1633,11 @@
],
"description": "Provides the functionality to compare PHP values for equality",
"homepage": "https://github.com/sebastianbergmann/comparator",
"keywords": [ "comparator", "compare", "equality" ],
"keywords": [
"comparator",
"compare",
"equality"
],
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
"source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3"
@ -1543,10 +1678,14 @@
}
},
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
@ -1559,7 +1698,12 @@
],
"description": "Diff implementation",
"homepage": "https://github.com/sebastianbergmann/diff",
"keywords": [ "diff", "udiff", "unidiff", "unified diff" ],
"keywords": [
"diff",
"udiff",
"unidiff",
"unified diff"
],
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
"source": "https://github.com/sebastianbergmann/diff/tree/3.0.3"
@ -1602,10 +1746,14 @@
}
},
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
@ -1614,7 +1762,11 @@
],
"description": "Provides functionality to handle HHVM/PHP environments",
"homepage": "http://www.github.com/sebastianbergmann/environment",
"keywords": [ "Xdebug", "environment", "hhvm" ],
"keywords": [
"Xdebug",
"environment",
"hhvm"
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
"source": "https://github.com/sebastianbergmann/environment/tree/4.2.4"
@ -1656,10 +1808,14 @@
}
},
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
@ -1684,7 +1840,10 @@
],
"description": "Provides the functionality to export PHP variables for visualization",
"homepage": "http://www.github.com/sebastianbergmann/exporter",
"keywords": [ "export", "exporter" ],
"keywords": [
"export",
"exporter"
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
"source": "https://github.com/sebastianbergmann/exporter/tree/3.1.5"
@ -1730,10 +1889,14 @@
}
},
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
@ -1742,7 +1905,9 @@
],
"description": "Snapshotting of global state",
"homepage": "http://www.github.com/sebastianbergmann/global-state",
"keywords": [ "global state" ],
"keywords": [
"global state"
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
"source": "https://github.com/sebastianbergmann/global-state/tree/3.0.2"
@ -1784,10 +1949,14 @@
}
},
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
@ -1835,10 +2004,14 @@
}
},
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
@ -1886,10 +2059,14 @@
}
},
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
@ -1942,10 +2119,14 @@
}
},
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
@ -1993,10 +2174,14 @@
}
},
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
@ -2042,10 +2227,14 @@
}
},
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
@ -2106,10 +2295,14 @@
"psr-4": {
"Symfony\\Component\\Console\\": ""
},
"exclude-from-classmap": [ "/Tests/" ]
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "MIT" ],
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
@ -2170,10 +2363,14 @@
"psr-4": {
"Symfony\\Component\\Debug\\": ""
},
"exclude-from-classmap": [ "/Tests/" ]
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "MIT" ],
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
@ -2240,13 +2437,17 @@
}
},
"autoload": {
"files": [ "bootstrap.php" ],
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "MIT" ],
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
@ -2307,10 +2508,14 @@
"psr-4": {
"Symfony\\Component\\Process\\": ""
},
"exclude-from-classmap": [ "/Tests/" ]
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "MIT" ],
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
@ -2364,10 +2569,14 @@
},
"type": "library",
"autoload": {
"classmap": [ "src/" ]
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Arne Blankerts",
@ -2415,13 +2624,17 @@
},
"type": "library",
"autoload": {
"files": [ "src/Wikimedia/Functions.php" ],
"files": [
"src/Wikimedia/Functions.php"
],
"psr-4": {
"Wikimedia\\AtEase\\": "src/Wikimedia/AtEase/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "GPL-2.0-or-later" ],
"license": [
"GPL-2.0-or-later"
],
"authors": [
{
"name": "Tim Starling",
@ -2468,10 +2681,14 @@
}
},
"autoload": {
"files": [ "phpunitpolyfills-autoload.php" ]
"files": [
"phpunitpolyfills-autoload.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [ "BSD-3-Clause" ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Team Yoast",
@ -2485,7 +2702,11 @@
],
"description": "Set of polyfills for changed PHPUnit functionality to allow for creating PHPUnit cross-version compatible tests",
"homepage": "https://github.com/Yoast/PHPUnit-Polyfills",
"keywords": [ "phpunit", "polyfill", "testing" ],
"keywords": [
"phpunit",
"polyfill",
"testing"
],
"support": {
"issues": "https://github.com/Yoast/PHPUnit-Polyfills/issues",
"source": "https://github.com/Yoast/PHPUnit-Polyfills"

View File

@ -1164,6 +1164,20 @@ class WC_Countries {
'label' => __( 'State', 'woocommerce' ),
),
),
'IR' => array(
'state' => array(
'priority' => 50,
),
'city' => array(
'priority' => 60,
),
'address_1' => array(
'priority' => 70,
),
'address_2' => array(
'priority' => 80,
),
),
'IT' => array(
'postcode' => array(
'priority' => 65,

View File

@ -82,6 +82,7 @@ class WC_Admin_Tests_OnboardingTasks_Task_Purchase extends WC_Unit_Test_Case {
* Test is_complete function of Purchase task.
*/
public function test_is_not_complete_if_remaining_paid_products() {
$this->markTestSkipped( 'Skipped temporarily due to change in endpoint behavior.' );
update_option( OnboardingProfile::DATA_OPTION, array( 'product_types' => array( 'memberships' ) ) );
$this->assertEquals( false, $this->task->is_complete() );
}
@ -160,6 +161,7 @@ class WC_Admin_Tests_OnboardingTasks_Task_Purchase extends WC_Unit_Test_Case {
* Test the task title if 2 paid items exist.
*/
public function test_get_title_if_multiple_paid_themes() {
$this->markTestSkipped( 'Skipped temporarily due to change in endpoint behavior.' );
update_option(
OnboardingProfile::DATA_OPTION,
array(
@ -174,6 +176,7 @@ class WC_Admin_Tests_OnboardingTasks_Task_Purchase extends WC_Unit_Test_Case {
* Test the task title if multiple additional paid items exist.
*/
public function test_get_title_if_multiple_paid_products() {
$this->markTestSkipped( 'Skipped temporarily due to change in endpoint behavior.' );
update_option(
OnboardingProfile::DATA_OPTION,
array(