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

Data sent to mondido does not handle variable products #64

Open
Icarleug opened this issue Nov 25, 2020 · 0 comments
Open

Data sent to mondido does not handle variable products #64

Icarleug opened this issue Nov 25, 2020 · 0 comments

Comments

@Icarleug
Copy link

Icarleug commented Nov 25, 2020

The SKU sent to mondido is based on the product and does not include variations.
If you need to use the SKU (see my other issue about wpml compatability) it would be better to replace

$product = wc_get_product($item->get_product_id());

with

$product_variation_id = $item['variation_id'];
// Check if product has variation.
if ($product_variation_id) {
$product = wc_get_product($product_variation_id);
} else {
$product = wc_get_product($item->get_product_id()));
}

in function get_items in class-wc-mondido-transaction

If not changed you will not get the separate variations correct during the callback.

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

No branches or pull requests

1 participant