Fix signature mismatch in WC CLI command api calls (#36240)
This commit is contained in:
parent
0d641253ac
commit
a633ff8abf
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: fix
|
||||||
|
|
||||||
|
Fix the signature mismatch affecting wc cli commands ability to fetch user subscription data.
|
|
@ -1280,6 +1280,8 @@ class WC_Helper {
|
||||||
$source = 'inbox-notes';
|
$source = 'inbox-notes';
|
||||||
elseif ( stripos( $request_uri, 'admin-ajax.php' ) ) :
|
elseif ( stripos( $request_uri, 'admin-ajax.php' ) ) :
|
||||||
$source = 'heartbeat-api';
|
$source = 'heartbeat-api';
|
||||||
|
elseif ( defined( 'WP_CLI' ) && WP_CLI ) :
|
||||||
|
$source = 'wc-cli';
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
// Obtain the connected user info.
|
// Obtain the connected user info.
|
||||||
|
@ -1287,7 +1289,7 @@ class WC_Helper {
|
||||||
'subscriptions',
|
'subscriptions',
|
||||||
array(
|
array(
|
||||||
'authenticated' => true,
|
'authenticated' => true,
|
||||||
'query_string' => esc_url( '?source=' . $source ),
|
'query_string' => '' !== $source ? esc_url( '?source=' . $source ) : '',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue