• Resolved bsanders44

    (@bsanders44)


    My first message to this forum was deleted with no explanation, so here goes a second try.

    I’m trying to manually add tax to an existing order in Woocommerce. However, when I click the “Add tax” button, the overlay that pops up only lists the first 100 tax rates. I have thousands of tax rates in my system – how do I access these other rates to add one? Or is there some better way to do this entirely?

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

Viewing 1 replies (of 1 total)
  • Hi @bsanders44 – This is currently the expected behavior, as described in this issue: https://github.com/woocommerce/woocommerce/issues/30172

    The SQL query used to find the applicable tax rates is:

    $rates = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}woocommerce_tax_rates ORDER BY tax_rate_name LIMIT 100" );

    Since there’s LIMIT 100 set, you’ll only see the first 100 that match.

    One workaround here, until this is converted to a search field in the future sometime, is to search for the database ID of the tax rate you want to use in the field at the end of the scroll: https://d.pr/i/jrGC03

    There are a couple of ways to get that tax_rate_id from your site’s database:

    1. If you know how to use the web inspector, you can find the data-id in the tax rate line item: https://d.pr/i/yQRiQw
    2. If you’re familiar with using SQL, you can run a quick database search using:
    • SELECT * FROMwp_woocommerce_tax_ratesWHEREtax_rate_name= ‘[tax name]’

    I know that neither of these is ideal, but it’s a smarter approach, considering altering the WooCommerce-core code will be overwritten each update.

    Let us know if you have any other questions!

Viewing 1 replies (of 1 total)
  • The topic ‘Add tax button doesn’t show all rates’ is closed to new replies.