Home / Admin / WP Simple Pay: Remove Decimals
Duplicate Snippet

Embed Snippet on Your Site

WP Simple Pay: Remove Decimals

Removes trailing decimals on price outputs.

Note: Does not affect Stripe Checkout.

Code Preview
php
<?php
/**
 * @link https://library.wpcode.com/snippet/j57zqp2g/
 */
add_filter(
	'simpay_decimal_places',
	/**
	 * @param int $places Number of decimal places.
	 * @return int
	 */
	function( $places ) {
		return 0;	
	}
);

Comments

Add a Comment