kullar
Forum Replies Created
-
I got it solved(I started to edit plugin files and printed variables out), but I think that there still exists some overlap between variables ID and products id’s if they match or something like that. It is not logical that this line difference affects price.
How I got sovled:
$id = get_the_ID(); $product = wc_get_product($id); $price = $product->get_price(); //If I move this price line inside not variable then prices are correct and also discounts. if (!$product->is_type('variable')) { //move price line to here and everything is correct //$price = $product->get_price(); } else { $variations = $product->get_available_variations(); foreach ($variations as $variation){ $product_variation = new WC_Product_Variation($variation['variation_id']); $price = $product_variation->get_price(); } }
Any updates?
Do you have any timeplan when it would be fixed? We would like to launch shop beginning in march, but this plugin is major fallback.
Are there any updates?
@ijasacodez Could you give me your email where I can send private link with theme and db backup?
Hi! Can I do something more to help you with this issue?
Hi!
I updated code and added some print_r to code.
https://testshop.telescope.ee/product-category/kanalisatsioon-tarvikud/valiskanalisatsioon/vk-torud/
Variation_id:2342
new WC_Product_Variation(2342)
get_price_html():2.30 € 2.07 €
get_price():2.07
get_regular_price(‘edit’):17.50
get_regular_price():2.07
get_sale_price():I have custom theme and I have tried several discount plugins before that(when I install back these plugins then settings are remembered – might there be an issue?), but it affects only this 1 variation. Other products are in the same loop. Product Id is correct, variation id is correct, but price is wrong.
Plugins list: https://photos.app.goo.gl/ti1uK77ij4KX7cre7
$product_variation = new WC_Product_Variation($variation_id);
This gives back price with wrong price(print_r(product_variation)) and also I have wrong price in products list(admin side).
I is possible me to print_r some results and paste here?
There are no other sales going on.