Add store action to update merchant details

This commit is contained in:
Philipp Stracker 2025-02-12 13:24:52 +01:00
parent e09ad9d74d
commit 67522b9557
No known key found for this signature in database
3 changed files with 16 additions and 0 deletions

View file

@ -110,6 +110,17 @@ export const setManualConnectionMode = ( useManualConnection ) =>
export const setWebhooks = ( webhooks ) =>
setPersistent( 'webhooks', webhooks );
/**
* Replace merchant details in the store.
*
* @param {Object} merchant - The new merchant details.
* @return {Action} The action.
*/
export const setMerchant = ( merchant ) => ( {
type: ACTION_TYPES.SET_MERCHANT,
payload: { merchant },
} );
/**
* Reset merchant details in the store.
*