Title: Round total not work
Last modified: July 11, 2023

---

# Round total not work

 *  Resolved [fixait](https://wordpress.org/support/users/fixait/)
 * (@fixait)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/round-total-not-work/)
 * Hi,
 * after installing the plugin, the round of the cart does not work for me. I am
   using this simple code:
 *     ```wp-block-code
       add_filter( 'woocommerce_calculated_total', 'custom_calculated_total' );
       function custom_calculated_total( $total ) {
       	$total = round($total);
       	return ceil($total);
       }
       ```
   
 * How to fix this in the plugin or code to make the rounding work?
   Thank you

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/round-total-not-work/#post-16886897)
 * hello
 * please, add this code too.
 * `add_action("woocommerce_after_calculate_totals", function ($wcCart) {
   $wcNoFilterWorker
   = new \ADP\BaseVersion\Includes\WC\WcNoFilterWorker();$wcNoFilterWorker->calculateTotals(
   $wcCart, $wcNoFilterWorker::FLAG_ALLOW_TOTALS_HOOKS);}, PHP_INT_MAX, 1);add_filter('
   wdp_calculate_totals_hook_priority', function($priority){return PHP_INT_MAX -
   1;});
 *  Thread Starter [fixait](https://wordpress.org/support/users/fixait/)
 * (@fixait)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/round-total-not-work/#post-16887375)
 * Hi
 * it’s work! Thanks
 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/round-total-not-work/#post-16888303)
 * You’re welcome

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Round total not work’ is closed to new replies.

 * ![](https://ps.w.org/advanced-dynamic-pricing-for-woocommerce/assets/icon-256x256.
   png?rev=1984204)
 * [Advanced Dynamic Pricing and Discount Rules for WooCommerce](https://wordpress.org/plugins/advanced-dynamic-pricing-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-dynamic-pricing-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-dynamic-pricing-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-dynamic-pricing-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-dynamic-pricing-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-dynamic-pricing-for-woocommerce/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [algol.plus](https://wordpress.org/support/users/algolplus/)
 * Last activity: [2 years, 12 months ago](https://wordpress.org/support/topic/round-total-not-work/#post-16888303)
 * Status: resolved