WordPress.org

Ready to get started?Download WordPress

Forums

Olimometer
Use dynamic total calculated from Gravity Forms (3 posts)

  1. mmtrav
    Member
    Posted 1 year ago #

    Hi Oliver,

    Love the plugin and want to donate some dosh to you for your audio streamer.

    But before I do that, could I get a hand?

    I am building a fundraising campaign page at this link.

    You will see your thermometer on that page, plus a total being calculated from purchases received from my gravity forms.

    The total is being calculated using this code.

    I am wondering if in the Olimometer options panel I can have the total load dynamically from the total received by gravity forms?

    What would I need to change in your plugin to make the total update dynamically instead of manually in the backend?

    Cheers,
    -Mikey

    http://wordpress.org/extend/plugins/olimometer/

  2. oshingler
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Glad you like it!

    I would add a call to your total_donations function in olimometer-class.php - look for the class's show function. If you calculate your total as one of the first things you can do, you can then save it as the current total for that meter:

    $my_calculated_total = total_donations();
    $this->olimometer_progress_value = $my_calculated_total;
    $this->save();

    This is the same as I use for the paypal and stayclassy integration.

    Oli

  3. oshingler
    Member
    Plugin Author

    Posted 1 year ago #

    I should also add, I'm assuming you would re-write total_donations to return a value not a string.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic