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

Commit 28fd155

Browse files
author
Tarun Vijwani
authored
Change action type name for use shipping as billing option (#7695)
1 parent 2ac02ad commit 28fd155

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

assets/js/data/checkout/action-types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ export const ACTION_TYPES = {
1010
SET_ORDER_NOTES: 'SET_CHECKOUT_ORDER_NOTES',
1111
INCREMENT_CALCULATING: 'INCREMENT_CALCULATING',
1212
DECREMENT_CALCULATING: 'DECREMENT_CALCULATING',
13-
SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS:
14-
'SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS',
13+
SET_USE_SHIPPING_AS_BILLING: 'SET_USE_SHIPPING_AS_BILLING',
1514
SET_SHOULD_CREATE_ACCOUNT: 'SET_SHOULD_CREATE_ACCOUNT',
1615
SET_EXTENSION_DATA: 'SET_EXTENSION_DATA',
1716
SET_IS_CART: 'SET_IS_CART',

assets/js/data/checkout/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export const __internalSetCustomerId = ( customerId: number ) => ( {
9999
export const __internalSetUseShippingAsBilling = (
100100
useShippingAsBilling: boolean
101101
) => ( {
102-
type: types.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS,
102+
type: types.SET_USE_SHIPPING_AS_BILLING,
103103
useShippingAsBilling,
104104
} );
105105

assets/js/data/checkout/reducers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const reducer = ( state = defaultState, action: CheckoutAction ) => {
9898
}
9999
break;
100100

101-
case types.SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS:
101+
case types.SET_USE_SHIPPING_AS_BILLING:
102102
if (
103103
action.useShippingAsBilling !== undefined &&
104104
action.useShippingAsBilling !== state.useShippingAsBilling

assets/js/data/checkout/test/reducer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ describe.only( 'Checkout Store Reducer', () => {
173173
).toEqual( expectedState );
174174
} );
175175

176-
it( 'should handle SET_SHIPPING_ADDRESS_AS_BILLING_ADDRESS', () => {
176+
it( 'should handle SET_USE_SHIPPING_AS_BILLING', () => {
177177
const expectedState = {
178178
...defaultState,
179179
status: STATUS.IDLE,

0 commit comments

Comments
 (0)