Woocommerce Product Bundles duplicate vat
-
Hi staff
I’m using your amazing plugin, thanks a lot for all your work
On my shop I have bundle products too and I’m trying to validate them on Google Merchant, but I have an issue with regular price
I’m using the field “Regular Price” as g:price and it works for all standard products, instead for bundle product, it contains the Regular Price inc. tax + tax again (ex. regular price should be 40,00€ – the plugin calculates 48,80€ with vat 22%)
I think the issue could be at line 2894 in woo-product-feed-pro/classes/class-get-products.php
f ($this->woosea_is_plugin_active(‘woocommerce-product-bundles/woocommerce-product-bundles.php’)){
$product_data[‘price’] = get_post_meta($product_data[‘id’], ‘_price’, true);
$product_data[‘sale_price’] = get_post_meta($product_data[‘id’], ‘_sale_price’, true);
if(is_numeric($tax_rates[1][‘rate’])){
$product_data[‘price_forced’] = round(get_post_meta($product_data[‘id’], ‘_price’, true) * (100+$tax_rates[1][‘rate’])/100,2);
$product_data[‘regular_price’] = round(get_post_meta($product_data[‘id’], ‘_regular_price’, true) * (100+$tax_rates[1][‘rate’])/100,2);
} else {
$product_data[‘price_forced’] = $product_data[‘price’];
$product_data[‘regular_price’] = $product_data[‘price’];
}`
`The code checks if the tax is available and applies it to the get_post_meta($product_data[‘id’], ‘_price’, true) which is already the price inc taxes (Woocommerce is configured to store price + vat)
Can you check it ?
Thanks
Diego
- The topic ‘Woocommerce Product Bundles duplicate vat’ is closed to new replies.