Round Totals to 1 decimal number

0.0/5
<?php
add_filter( 'woocommerce_package_rates', 'roundup_rates', 10, 2 );

function roundup_rates( $rates, $package ) {
	foreach( $rates as $key => $rate ) {
		$rates[$key]->cost = ceil( $rate->cost );
	}
	return $rates;
}

Comments and reviews

{{ reviewsTotal }} Review
{{ reviewsTotal }} Reviews
{{ options.labels.newReviewButton }}
{{ userData.canReview.message }}

Description

This snippet was fetched automatically from WPDistro.cz projects.

Author

Tags

This snippet is untagged