-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into add/7193-dispute-cta-for-inquries
- Loading branch information
Showing
56 changed files
with
749 additions
and
181 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
changelog/dev-7258-remove-hooks-from-multi-currency-constructor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: dev | ||
|
||
Move hooks out of MultiCurrency constructor into own init_hooks method. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Significance: patch | ||
Type: dev | ||
Comment: Adding a few unit tests | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: add | ||
|
||
Handle server-side feature flag for new UPE type enablement. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: fix | ||
|
||
Virtual variable products no longer require shipping details when checking out with Apple Pay and Google Pay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: dev | ||
|
||
This work is part of a UI improvements to increase disputes response that is behind a feature flag. A changelog entry will be added to represent the work as a whole. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: update | ||
|
||
Update the content of modals that are displayed when deactivating the WooPayments or Woo Subscriptions plugins when the store has active Stripe Billing subscriptions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import React, { useEffect } from 'react'; | ||
import { getHistory } from '@woocommerce/navigation'; | ||
import { Spinner, Icon, Flex, FlexItem } from '@wordpress/components'; | ||
|
||
/** | ||
* Internal dependencies. | ||
*/ | ||
import Page from 'components/page'; | ||
import { useDispute } from 'data/index'; | ||
import { Charge } from 'wcpay/types/charges'; | ||
import { getAdminUrl } from 'wcpay/utils'; | ||
|
||
import './style.scss'; | ||
import warning from 'wcpay/components/icons/warning'; | ||
|
||
const RedirectToTransactionDetails: React.FC< { query: { id: string } } > = ( { | ||
query: { id: disputeId }, | ||
} ) => { | ||
const { dispute, error, isLoading } = useDispute( disputeId ); | ||
|
||
useEffect( () => { | ||
if ( ! isLoading && dispute?.charge ) { | ||
// Dispute type allows charge as nested object or string ID, | ||
// so we have to hint we expect a Charge object here. | ||
const chargeObject = dispute.charge as Charge; | ||
const transactionDetailsUrl = getAdminUrl( { | ||
page: 'wc-admin', | ||
path: '/payments/transactions/details', | ||
id: chargeObject.payment_intent, | ||
transaction_id: chargeObject.balance_transaction, | ||
type: 'dispute', | ||
} ); | ||
getHistory().replace( transactionDetailsUrl ); | ||
} | ||
}, [ dispute, isLoading ] ); | ||
|
||
return ( | ||
<Page> | ||
<Flex | ||
direction="column" | ||
className="wcpay-dispute-detail-legacy-redirect" | ||
> | ||
{ error ? ( | ||
<> | ||
<FlexItem> | ||
<Icon icon={ warning } type="warning" size={ 32 } /> | ||
</FlexItem> | ||
<FlexItem> | ||
<div> | ||
<b>Error retrieving dispute</b> | ||
</div> | ||
<div>Please check your network and try again.</div> | ||
</FlexItem> | ||
</> | ||
) : ( | ||
<> | ||
<FlexItem> | ||
<Spinner /> | ||
</FlexItem> | ||
<FlexItem> | ||
<div> | ||
<b>One moment please</b> | ||
</div> | ||
<div>Redirecting to payment details…</div> | ||
</FlexItem> | ||
</> | ||
) } | ||
</Flex> | ||
</Page> | ||
); | ||
}; | ||
|
||
export default RedirectToTransactionDetails; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.wcpay-dispute-detail-legacy-redirect { | ||
// Shift the redirect spinner to approx center of viewport. | ||
top: 10vh; | ||
position: relative; | ||
|
||
.components-flex-item { | ||
text-align: center; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.