You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is i am not able to get the count of the data in the api response headers(like for customer i want total records of customer's and not able to get the total count of records that is in most of the case you will get from the response headers.
Also when i am using woocommerce v6.4.1 things are working fine i can get the total counts of records from the headers.
i am using an SDK to get the response(https://github.com/woocommerce/wc-api-php)
using the following method to get headers data($authenticate->http->getResponse()->getHeaders();) in both of the version that is v4.5 and 6.4.1 but not getting record count in headers in v4.5.
getting this in response header:
Were you able to obtain the headers “X-WP-Total, X-WP-TotalPages?
when you use a single query, you will not get these headers, but if you use a list query, you will get the information from these headers, using the query string “?per_page=<number_max_100>&page=<number_of_page>”.
for example making a query from a list to the products:
Hi,
i am migrating woo commerce site data and using the rest api doc (https://woocommerce.github.io/woocommerce-rest-api-docs/#introduction)
my woocommerce version: 4.5
rest api v3
The issue is i am not able to get the count of the data in the api response headers(like for customer i want total records of customer's and not able to get the total count of records that is in most of the case you will get from the response headers.
Also when i am using woocommerce v6.4.1 things are working fine i can get the total counts of records from the headers.
i am using an SDK to get the response(https://github.com/woocommerce/wc-api-php)
using the following method to get headers data($authenticate->http->getResponse()->getHeaders();) in both of the version that is v4.5 and 6.4.1 but not getting record count in headers in v4.5.
getting this in response header:
"access-control-expose-headers" => "X-WP-Total, X-WP-TotalPages, X-JWT-Refresh"
now how can i get these above "X-WP-Total, X-WP-TotalPages"
Can any one please describe.
Thanks!
The text was updated successfully, but these errors were encountered: