Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A product id can overflow an int32 #560

Closed
NicolaBizzoca opened this issue Jan 19, 2021 · 5 comments
Closed

A product id can overflow an int32 #560

NicolaBizzoca opened this issue Jan 19, 2021 · 5 comments
Labels
Milestone

Comments

@NicolaBizzoca
Copy link

Hi,
A post id on WordPress is defined as: bigint(20) unsigned
Which can overflow an int32, which is the type used by WooCommerce.NET for product id

It could be possible to change the type of the product id to fit the max size of a WordPress post id?

@XiaoFaye XiaoFaye added the bug label Jan 19, 2021
@XiaoFaye XiaoFaye added this to the 0.8.3 milestone Jan 19, 2021
@XiaoFaye
Copy link
Owner

Hi, this is done in version 0.8.3.

@gaazkam
Copy link

gaazkam commented Mar 17, 2021

@XiaoFaye Varius Delete methods still accept int ids, not uint.

For example WCObject.Order.Deleet accepts the int id parameter. Likewise, OrderBatch.delete (and BatchObject<T>.delete in general) is also declared as List<int> rather than List<uint>.

@XiaoFaye
Copy link
Owner

Ops, forgot to change the parameter, will do it in the next version.

@gkverneland
Copy link

@XiaoFaye The Id property should be long or ulong (64 bit) because overflow still occurs, for example when I am downloading an order with ID = 61000150083

@richardaubin
Copy link

richardaubin commented Nov 28, 2022

This is still not fixed in version 0.8.4 nuget package. Delete has int parameter instead of ulong....
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants