Pass the WC payments tab URL to JS

This commit is contained in:
Narek Zakarian 2024-11-08 14:06:38 +04:00
parent d3accc0d8c
commit 66536f2a57
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7
2 changed files with 4 additions and 3 deletions

View file

@ -60,7 +60,7 @@ const Navigation = ( {
</div>
{ ! isFistStep && (
<div className="ppcp-r-navigation--right">
<a href="wp-admin/admin.php?page=wc-settings&amp;tab=checkout"
<a href={ global.ppcpSettings.wcPaymentsTabUrl }
aria-label="Return to payments">{__('Save and exit', 'woocommerce-paypal-payments')}</a>
{ ! isLastStep && (
<Button

View file

@ -85,10 +85,11 @@ class SettingsModule implements ServiceModule, ExecutableModule {
'ppcp-admin-settings',
'ppcpSettings',
array(
'assets' => array(
'assets' => array(
'imagesUrl' => $module_url . '/images/',
),
'debug' => defined( 'WP_DEBUG' ) && WP_DEBUG,
'wcPaymentsTabUrl' => admin_url( 'admin.php?page=wc-settings&tab=checkout' ),
'debug' => defined( 'WP_DEBUG' ) && WP_DEBUG,
)
);
}