Merge pull request #32620 from woocommerce/update/32617-payment-method-links

Update payment method link to the internal extensions marketplace
This commit is contained in:
Chi-Hsuan Huang 2022-04-14 19:02:04 +08:00 committed by GitHub
commit 750f1498a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View File

@ -14,6 +14,7 @@ import { useMemo, useCallback, useEffect } from '@wordpress/element';
import { registerPlugin } from '@wordpress/plugins';
import { WooOnboardingTask } from '@woocommerce/onboarding';
import { getNewPath } from '@woocommerce/navigation';
import { getAdminLink } from '@woocommerce/settings';
import { Button } from '@wordpress/components';
import ExternalIcon from 'gridicons/dist/external';
@ -29,9 +30,6 @@ import { getCountryCode } from '~/dashboard/utils';
import './plugins/Bacs';
import './payment-gateway-suggestions.scss';
const SEE_MORE_LINK =
'https://woocommerce.com/product-category/woocommerce-extensions/payment-gateways/?utm_source=payments_recommendations';
const comparePaymentGatewaysByPriority = ( a, b ) =>
a.recommendation_priority - b.recommendation_priority;
@ -323,7 +321,9 @@ export const PaymentGatewaySuggestions = ( { onComplete, query } ) => {
footerLink={
! isWCPayOrOtherCategoryDoneSetup && (
<Button
href={ SEE_MORE_LINK }
href={ getAdminLink(
'admin.php?page=wc-addons&section=payment-gateways'
) }
target="_blank"
onClick={ trackSeeMore }
isTertiary

View File

@ -0,0 +1,4 @@
Significance: patch
Type: update
Update payment method link to the internal extension marketplace

View File

@ -209,13 +209,13 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page {
* See https://github.com/woocommerce/woocommerce/issues/32130 for more details.
*/
if ( WooCommercePayments::is_supported() ) {
$columns_count = count( $columns );
$columns_count = count( $columns );
$link_text = __( 'Other payment methods', 'woocommerce' );
$external_link_icon = '<svg style="margin-left: 4px" class="gridicon gridicons-external needs-offset" height="18" width="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M19 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V7a2 2 0 012-2h6v2H5v12h12v-6h2zM13 3v2h4.586l-7.793 7.793 1.414 1.414L19 6.414V11h2V3h-8z"></path></g></svg>';
echo '<tr>';
// phpcs:ignore -- ignoring the error since the value is harded.
echo "<td style='border-top: 1px solid #c3c4c7; background-color: #fff' colspan='{$columns_count}'>";
echo "<a id='settings-other-payment-methods' href='https://woocommerce.com/product-category/woocommerce-extensions/payment-gateways/?utm_source=payments_recommendations' target='_blank' class='components-button is-tertiary'>";
echo "<a id='settings-other-payment-methods' href='" . esc_url( admin_url( 'admin.php?page=wc-addons&section=payment-gateways' ) ) . "' target='_blank' class='components-button is-tertiary'>";
// phpcs:ignore
echo $link_text;
// phpcs:ignore