Woocommerce not calculating tax woo_debug shows join error
-
I get these errors made them bold. This shows in WP_DEBUG.
SELECT * FROM (
SELECT tax_rates.* FROM
wp_woocommerce_tax_rates as tax_rates
LEFT OUTER JOIN
wp_woocommerce_tax_rate_locations as locations ON tax_rates.tax_rate_id = locations.tax_rate_id
LEFT OUTER JOIN
wp_woocommerce_tax_rate_locations as locations2 ON tax_rates.tax_rate_id = locations2.tax_rate_id
WHERE
tax_rate_country IN ( ‘US’, ” )
AND tax_rate_state IN ( ‘CA’, ” )
AND tax_rate_class = ”
AND
(
(
locations.location_type IS NULL
)
OR
(
locations.location_type = ‘postcode’
AND locations.location_code IN (‘*’,”)
AND locations2.location_type = ‘city’
AND locations2.location_code = ”
)
OR
(
locations.location_type = ‘postcode’
AND locations.location_code IN (‘*’,”)
AND 0 = (
SELECT COUNT(*) FROM wp_woocommerce_tax_rate_locations as sublocations
WHERE sublocations.location_type = ‘city’
AND sublocations.tax_rate_id = tax_rates.tax_rate_id
)
)
OR
(
locations.location_type = ‘city’
AND locations.location_code = ”
AND 0 = (
SELECT COUNT(*) FROM wp_woocommerce_tax_rate_locations as sublocations
WHERE sublocations.location_type = ‘postcode’
AND sublocations.tax_rate_id = tax_rates.tax_rate_id
)
)
)
GROUP BY
tax_rate_id
ORDER BY
tax_rate_priority, tax_rate_order
) as ordered_taxes
GROUP BY
tax_rate_priorityThe SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
SELECT * FROM (
SELECT tax_rates.* FROM
wp_woocommerce_tax_rates as tax_rates
LEFT OUTER JOIN
wp_woocommerce_tax_rate_locations as locations ON tax_rates.tax_rate_id = locations.tax_rate_id
LEFT OUTER JOIN
wp_woocommerce_tax_rate_locations as locations2 ON tax_rates.tax_rate_id = locations2.tax_rate_id
WHERE
tax_rate_country IN ( ‘US’, ” )
AND tax_rate_state IN ( ‘CA’, ” )
AND tax_rate_class = ”
AND
(
(
locations.location_type IS NULL
)
OR
(
locations.location_type = ‘postcode’
AND locations.location_code IN (‘*’,”)
AND locations2.location_type = ‘city’
AND locations2.location_code = ”
)
OR
(
locations.location_type = ‘postcode’
AND locations.location_code IN (‘*’,”)
AND 0 = (
SELECT COUNT(*) FROM wp_woocommerce_tax_rate_locations as sublocations
WHERE sublocations.location_type = ‘city’
AND sublocations.tax_rate_id = tax_rates.tax_rate_id
)
)
OR
(
locations.location_type = ‘city’
AND locations.location_code = ”
AND 0 = (
SELECT COUNT(*) FROM wp_woocommerce_tax_rate_locations as sublocations
WHERE sublocations.location_type = ‘postcode’
AND sublocations.tax_rate_id = tax_rates.tax_rate_id
)
)
)
GROUP BY
tax_rate_id
ORDER BY
tax_rate_priority, tax_rate_order
) as ordered_taxes
GROUP BY
tax_rate_priorityThe SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
- The topic ‘Woocommerce not calculating tax woo_debug shows join error’ is closed to new replies.