XiaoFaye / WooCommerce.NET

A .NET Wrapper for WooCommerce/WordPress REST API
MIT License
391 stars 219 forks source link

Category GetAll only get 10 items no more #697

Closed xplertor closed 2 years ago

xplertor commented 2 years ago

When I try to obtain all the woo categories but I only get 10 items when there are actually 25 in the Woo.

matteozoni commented 2 years ago

Try like this

                Dictionary<string, string> ParCall = new Dictionary<string, string>();
                ParCall.Add("per_page", "30");

                var lCategory = await wc.Category.GetAll(ParCall);
xplertor commented 2 years ago

Fine!! it's work, but does it mean that every GetAll query needs to send a Dic var as a parameter??

matteozoni commented 2 years ago

Yes, and if the elements are higher than 100 (maximum limit of the parameter) you have to read the following pages

xplertor commented 2 years ago

Thanks!!