Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter adriano0208

    (@adriano0208)

    hi guys, could someone help me, please?

    Plugin Support Matheus Martins

    (@matheusfd)

    Hi @adriano0208,

    Happy to clarify that!

    The GiveWP was designed to round the numbers by default for the goals, so out of the box, it’s not possible to change it.

    However, a workaround for that would be to extend the plugin using its filters, which requires a bit of code knowledge. I’ve created this code snippet that you can use as the rails to developed your custom code. It changes the format for the goal to display the decimal numbers.

    Your goal would look like this: https://imgur.com/a/J1SNz94

    Here is the code snippet:
    https://gist.github.com/matheuswd/af9602992da9773cc62fd20ace8da01f

    <?php
    // Changes the format for the amount raised
    function change_amount_raised_goal_decimal($form_currency) {
    	$income_format_args = array(
    		'sanitize' => false,
    		'currency' => $form_currency,
    		'decimal'  => true,
    	);
    }
    
    add_filter('give_goal_income_format_args', 'change_amount_raised_goal_decimal');
    
    // Changes the format for the goal amount
    function change_goal_raised_decimal($form_currency) {
    	$goal_format_args = array(
    		'sanitize' => false,
    		'currency' => $form_currency,
    		'decimal'  => true,
    	);
    	
    	return $goal_format_args;
    }
    
    add_filter('give_goal_amount_format_args', 'change_goal_raised_decimal');

    If you need assistance implementing custom PHP code on your website we have this guide:

    https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/

    Please note that this code snippet is provided as an example of how you can extend GiveWP with code. It’s up to you to implement and customize to your liking. We cannot provide support for custom code on your website, only the code that we create and distribute.

    Please let us know if you have further questions on this or need any additional assistance!

    This is a serious usability issue if you ask me. How can we have monetary transactions rounded up? There are folks who contribute in cents and pence. Having a rounding up is wrong. These are monetary transactions. You absolutely should allow what amount a donor wishes to donate. There are tax claims, rebates, receipts etc. all tied around donations made by donors. How can you just have donors having to round up every donation?

    There are charities working hard and every penny helps them move forward.

    • This reply was modified 3 years, 7 months ago by amantechaman.
    • This reply was modified 3 years, 7 months ago by amantechaman.
    • This reply was modified 3 years, 7 months ago by amantechaman.
    • This reply was modified 3 years, 7 months ago by amantechaman.

    I would really like to see how to get the GiveWP plugin to allow for cents to be included as well, NOT to be rounded up.
    There are some that give, but are only able to give certain dollars and cents, not rounding up.
    Please help me know how to fix this. Thank you.

    Plugin Support Matheus Martins

    (@matheusfd)

    Hi @danielrmesa3 and @amantechaman,

    For now, it’s not possible to have cents enabled on the multi-step donation form, but I understand it’s a need for your sites, so we’ve added you both as a voter for this feature, so the product development team knows that our users need that.

    You can follow up on the discussion here https://feedback.givewp.com/feature-requests/p/the-multi-step-donation-form-should-allow-decimal-numbers. You are welcome to add your two cents too if that’s the case.

    Have a great day!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘does not display the cents’ is closed to new replies.