Adding New Custom Flat Shipping Rates in WooCommerce 2.4+

Since WooCommerce 2.4, the flat shipping rates interface have been really improved and it’s now so simple that it can even be confusing for some users.

A common request is:

“how can I add new custom flat rates?”

Because, that’s true, in previous versions you could do it via the interface, but now you need custom coding. So, to add new custom flat rates, simply add this snippet to functions.php in the theme folder:

add_action( 'woocommerce_flat_rate_shipping_add_rate', 'add_another_custom_flat_rate', 10, 2 );

function add_another_custom_flat_rate( $method, $rate ) {
	$new_rate          = $rate;
	$new_rate['id']    .= ':' . 'custom_rate_name'; // Append a custom ID
	$new_rate['label'] = 'Rushed Shipping'; // Rename to 'Rushed Shipping'
	$new_rate['cost']  += 2; // Add $2 to the cost

	// Add it to WC
	$method->add_rate( $new_rate );
}

Result:

custom-flat-rates

You can learn more about all that in the official docs.