Fix API namespace for the WooCommerce.com Connect Task (https://github.com/woocommerce/woocommerce-admin/pull/2979)
This commit is contained in:
parent
db4328acb8
commit
c5034567fc
|
@ -17,7 +17,7 @@ import { getHistory, getNewPath } from '@woocommerce/navigation';
|
|||
/**
|
||||
* Internal depdencies
|
||||
*/
|
||||
import { NAMESPACE } from 'wc-api/constants';
|
||||
import { WC_ADMIN_NAMESPACE } from 'wc-api/constants';
|
||||
import withSelect from 'wc-api/with-select';
|
||||
|
||||
class Connect extends Component {
|
||||
|
@ -67,7 +67,7 @@ class Connect extends Component {
|
|||
async request() {
|
||||
try {
|
||||
const connectResponse = await apiFetch( {
|
||||
path: `${ NAMESPACE }/onboarding/plugins/request-wccom-connect`,
|
||||
path: `${ WC_ADMIN_NAMESPACE }/onboarding/plugins/request-wccom-connect`,
|
||||
method: 'POST',
|
||||
} );
|
||||
if ( connectResponse && connectResponse.connectAction ) {
|
||||
|
@ -84,7 +84,7 @@ class Connect extends Component {
|
|||
const { query } = this.props;
|
||||
try {
|
||||
const connectResponse = await apiFetch( {
|
||||
path: `${ NAMESPACE }/onboarding/plugins/finish-wccom-connect`,
|
||||
path: `${ WC_ADMIN_NAMESPACE }/onboarding/plugins/finish-wccom-connect`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
request_token: query.request_token,
|
||||
|
|
Loading…
Reference in New Issue