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

Suppor for product variations #11

Open
dcoturel opened this issue Apr 11, 2018 · 1 comment
Open

Suppor for product variations #11

dcoturel opened this issue Apr 11, 2018 · 1 comment

Comments

@dcoturel
Copy link

Hi, icoderman,
I have another issue with dealing with product variations.
In the case of an update, you have to call the api with two params:

/products/:product_id/variations/:variation_id

The current update() method requires one id parameter, and uses this to assign the last String.format placeholder.
You think there is a way to handle this without modifying current WooCommerce interface?

Regards

@Danc2050
Copy link

You can put it in a batch and use the String.format() function:

Map response = wooCommerce.batch(String.format("products/%d/variations", productId), reqOptions);

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

No branches or pull requests

2 participants