Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

How to echo flat rate id shipping cost WordPress


Hi how do I echo the flat rate shipping cost?

I've tried this but it doesn't work so I've obviously coded wrong!

echo woocommerce_price( $method->id['flat_rates']->cost );

Answers (1)


Arnav Joy answers:

you can try following

$woocommerce_flat_rate_settings = get_option('woocommerce_flat_rate_settings');

echo woocommerce_price( $woocommerce_flat_rate_settings['cost_per_order'] );

willcm comments:

thanks works perfectly