• Resolved harjapaa

    (@harjapaa)


    Hello,

    I’ve set the initial price without VAT at 87.903 €, which gives us the final price 109,00 € including VAT. However, it seems that the plugin adds the 24% VAT again, as it suggests the lowest price in the last 30 days would be 135,16 €. Any suggestions?

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Marin Matosevic

    (@marinmatosevic)

    Have you configured the Tax options recently, or were they established prior to activating our plugin?

    Please share a screenshot of the Price History tab within the product edit section. I’d like to examine the price history table specifically for that product.

    Thank you.

    Thread Starter harjapaa

    (@harjapaa)

    Tax options haven’t been touched since plugin installation, so they were established prior to activating the plugin.

    Price History for this product says:

    “No pricing data recorded since plugin activation – This message indicates that no pricing data has been saved in the database since the activation of the plugin. This can occur if the plugin was recently installed or if the product price has not changed since the activation of the plugin.”

    Thread Starter harjapaa

    (@harjapaa)

    The problem only seems to occur in Variable Products. Simple products don’t have the problem.

    Here is an example of a simple product, where the lowest price is as expected: https://www.yozendesign.com/tuote/art-deco-nappikorvakorut-viininpunainen/

    Plugin Author Marin Matosevic

    (@marinmatosevic)

    Which options have you enabled in the Lowest Price module?

    Plugin Author Marin Matosevic

    (@marinmatosevic)

    Absolutely spot on! There’s indeed a bug, and it only pops up when there are fewer than two price changes with the “inherit from regular price” option enabled. No worries, though – we’ve identified the issue, and it’s set to be patched in the next plugin release, due in the next few days.

    In the meantime, you can use the following code snippet in your functions.php or a PHP snippets plugin to prevent the double tax calculation:

    add_filter('pph_lowest_price', function ($lowest_price, $product_id, $product) {
    
    	$inherit_regular = DEVNET_PPH_OPTIONS['lowest_price']['inherit_regular'] ?? true;
    
    	if ($inherit_regular) {
    
    		$entries = Devnet\PPH\Includes\Helper::get_price_history($product_id, false);
    
    		$entries_count = count($entries);
    
    		if (empty($entries) || $entries_count === 1) {
    			if ($product->get_type() === 'variable') {
    				$lowest_price = $product->get_variation_regular_price('max', false);
    			}
    		}
    	}
    
    	return $lowest_price;
    }, 10, 3);

    Just a heads-up: once you’ve updated the plugin to the new version, feel free to remove the above code snippet.

    Big thanks for bringing this bug to our attention! We appreciate your help in making our plugin even better.

    Cheers!

    Thread Starter harjapaa

    (@harjapaa)

    Thanks for your super quick response, and for the fix! After applying the fix, it works as expected.

    Thank you!

    Plugin Author Marin Matosevic

    (@marinmatosevic)

    Great! I’m glad that I was able to help you. 🙂 If you find the plugin handy and feel like sharing your thoughts, leaving a review would be awesome. Your input is truly appreciated!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘VAT issue’ is closed to new replies.