This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 5 replies, has 2 voices.

Last updated by roniC-2 2 months, 4 weeks ago.

Assigned support staff: Bigul.

Author Posts
July 18, 2019 at 3:27 pm #4240153

roniC-2

I am trying to:
Get all subscriptions regardless of languages.

Link to a page where the issue can be seen:
API from back end, no front end to be seen.

I expected to see:
All subscriptions

Instead, I got:
No subscriptions.

When calling separately for each language (he, en) - I get the subscriptions right.

July 18, 2019 at 5:24 pm #4241403

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve these issues.

To help you faster, I've enabled debug information for this support ticket. Please see this link for how to get this information from your site and give it to us: http://wpml.org/faq/provide-debug-information-faster-support/

Please share me the code you are using for listing the *subscriptions* posts for a better understanding.

--
Thanks!

Bigul

July 18, 2019 at 5:28 pm #4241417

roniC-2

We use the use Automattic\WooCommerce\Client;

Here are the calls - (API is validated and working)
$subscriptionsHe = $this->_client->get("subscriptions", array('customer' => $userId, 'lang' => 'he'));
$subscriptionsEn = $this->_client->get("subscriptions", array('customer' => $userId, 'lang' => 'en'));
$subscriptions = array_merge($subscriptionsEn, $subscriptionsHe);

And it would be best to have it as:

$subscriptions = $this->_client->get("subscriptions", array('customer' => $userId, 'lang' => 'all'));

July 18, 2019 at 6:03 pm #4241675

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the updates. I would like to access the admin area of your site for further checking. Please fill the private details fields after a full site backup.

Please check the following links for more details about our private information sharing policies.

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

hidden link

--
Thanks!

Bigul

July 23, 2019 at 4:11 pm #4267931

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Roni,

Thank you for the updates. I have requested for the access to know more details about *subscriptions* post type and its settings for reproducing the issue on my local copy.

I have discussed about this our team and they told it will be a nice feature request. So please visit the following URL and fill the form. It will be considered. Thank you for the understanding.

https://wpml.org/suggest-a-new-feature-for-wpml/

--
Thanks!

Bigul

July 23, 2019 at 4:44 pm #4268209

roniC-2

I understand, it seems possible to add as it is supported on other Woo modules.
And you're supporting the specific language parameter.
It is just missing the support for 'all' parameter.

Issue opened as requested. hopefully this will be added in the future.