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
|
* Internal depdencies
|
||||||
*/
|
*/
|
||||||
import { NAMESPACE } from 'wc-api/constants';
|
import { WC_ADMIN_NAMESPACE } from 'wc-api/constants';
|
||||||
import withSelect from 'wc-api/with-select';
|
import withSelect from 'wc-api/with-select';
|
||||||
|
|
||||||
class Connect extends Component {
|
class Connect extends Component {
|
||||||
|
@ -67,7 +67,7 @@ class Connect extends Component {
|
||||||
async request() {
|
async request() {
|
||||||
try {
|
try {
|
||||||
const connectResponse = await apiFetch( {
|
const connectResponse = await apiFetch( {
|
||||||
path: `${ NAMESPACE }/onboarding/plugins/request-wccom-connect`,
|
path: `${ WC_ADMIN_NAMESPACE }/onboarding/plugins/request-wccom-connect`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
} );
|
} );
|
||||||
if ( connectResponse && connectResponse.connectAction ) {
|
if ( connectResponse && connectResponse.connectAction ) {
|
||||||
|
@ -84,7 +84,7 @@ class Connect extends Component {
|
||||||
const { query } = this.props;
|
const { query } = this.props;
|
||||||
try {
|
try {
|
||||||
const connectResponse = await apiFetch( {
|
const connectResponse = await apiFetch( {
|
||||||
path: `${ NAMESPACE }/onboarding/plugins/finish-wccom-connect`,
|
path: `${ WC_ADMIN_NAMESPACE }/onboarding/plugins/finish-wccom-connect`,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: {
|
data: {
|
||||||
request_token: query.request_token,
|
request_token: query.request_token,
|
||||||
|
|
Loading…
Reference in New Issue