diff --git a/admin/class-informatiq-sp-admin.php b/admin/class-informatiq-sp-admin.php index 112e2a66..b414787d 100644 --- a/admin/class-informatiq-sp-admin.php +++ b/admin/class-informatiq-sp-admin.php @@ -883,11 +883,18 @@ class Informatiq_SP_Admin { } // Get local price (sale price priority, then regular). + // Always calculate tax-inclusive price for comparison with Google (which is always tax-inclusive). $sale_price = $product->get_sale_price(); $regular_price = $product->get_regular_price(); - $local_price = ! empty( $sale_price ) ? $sale_price : $regular_price; + $base_price = ! empty( $sale_price ) ? $sale_price : $regular_price; $price_type = ! empty( $sale_price ) ? 'sale' : 'regular'; + // Get price including tax for fair comparison with Google. + $local_price = null; + if ( $base_price ) { + $local_price = wc_get_price_including_tax( $product, array( 'price' => $base_price ) ); + } + // Try to find matching Google product. $google_product = null; $match_type = '';