woocommerce get standard tax rate

Question

I’m using this get_rates() function to get the current tax rate from woocommerce, But i get an this error:

code:

$tax_rate = round( reset( WC_Tax::get_rates() )['rate'] );
print_r($tax_rate);

error:

Only variables should be passed by reference

What variable should be passsed?

0
Sander105 1 month 2022-08-13T07:53:36-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse