Title: Remove value after Decimal
Last modified: August 12, 2022

---

# Remove value after Decimal

 *  Resolved [Dipesh](https://wordpress.org/support/users/dipeshpatel780/)
 * (@dipeshpatel780)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/remove-value-after-decimal/)
 * I want all affiliate income should be rounded off.
    Example 14.57 it should be
   15.00 like this.

Viewing 1 replies (of 1 total)

 *  Plugin Author [iova.mihai](https://wordpress.org/support/users/iovamihai/)
 * (@iovamihai)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/remove-value-after-decimal/#post-15913937)
 * Hey [@dipeshpatel780](https://wordpress.org/support/users/dipeshpatel780/),
 * Thank you for reaching out! Currently, rounding off numbers can only be done 
   through custom code and not directly from the admin interface.
 * Here’s the code that does this:
 *     ```
       function slicewp_custom_round_up_commission_amount( $data ) {
   
       	if ( empty( $data['amount'] ) )
       		return $data;
   
       	$data['amount'] = slicewp_sanitize_amount( ceil( $data['amount'] ) );
   
       	return $data;
   
       }
       add_filter( 'slicewp_pre_insert_commission_data', 'slicewp_custom_round_up_commission_amount', 50 );
       ```
   
 * Please copy the above code and place into your website. If you’re not sure how
   to add code to your site, you can use a plugin like Code Snippets ([https://wordpress.org/plugins/code-snippets/](https://wordpress.org/plugins/code-snippets/)).
 * Please try it out and let me know how it goes.
 * Thank you and best wishes,
    Mihai

Viewing 1 replies (of 1 total)

The topic ‘Remove value after Decimal’ is closed to new replies.

 * ![](https://ps.w.org/slicewp/assets/icon-256x256.png?rev=2432848)
 * [Affiliate Program Suite — SliceWP Affiliates](https://wordpress.org/plugins/slicewp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/slicewp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/slicewp/)
 * [Active Topics](https://wordpress.org/support/plugin/slicewp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/slicewp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/slicewp/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [iova.mihai](https://wordpress.org/support/users/iovamihai/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/remove-value-after-decimal/#post-15913937)
 * Status: resolved