2019-12-10 19:28:19 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { __ } from '@wordpress/i18n';
|
|
|
|
import domReady from '@wordpress/dom-ready';
|
2022-01-06 12:53:30 +00:00
|
|
|
import { getAdminLink } from '@woocommerce/settings';
|
2019-12-10 19:28:19 +00:00
|
|
|
|
|
|
|
domReady( () => {
|
|
|
|
const actionButtons = document.querySelector( '.wc-actions' );
|
|
|
|
if ( actionButtons ) {
|
2020-02-14 02:23:21 +00:00
|
|
|
const primaryButton = document.querySelector(
|
|
|
|
'.wc-actions .button-primary'
|
|
|
|
);
|
2019-12-10 19:28:19 +00:00
|
|
|
if ( primaryButton ) {
|
|
|
|
primaryButton.classList.remove( 'button' );
|
|
|
|
primaryButton.classList.remove( 'button-primary' );
|
|
|
|
}
|
|
|
|
|
|
|
|
const continueButton = document.createElement( 'a' );
|
|
|
|
continueButton.classList.add( 'button' );
|
|
|
|
continueButton.classList.add( 'button-primary' );
|
2020-02-14 02:23:21 +00:00
|
|
|
continueButton.setAttribute(
|
|
|
|
'href',
|
|
|
|
getAdminLink( 'admin.php?page=wc-admin' )
|
|
|
|
);
|
2022-03-30 09:00:04 +00:00
|
|
|
continueButton.innerText = __( 'Continue setup', 'woocommerce' );
|
2019-12-10 19:28:19 +00:00
|
|
|
|
|
|
|
actionButtons.appendChild( continueButton );
|
|
|
|
}
|
|
|
|
} );
|