jdowns1
Forum Replies Created
-
Apologies, you are right. I’ve been working with your plugin so much that I didn’t even realize.
Perfect, thanks!
I went ahead and installed the Fee Relief extension, I think that will get me what I need. Appreciate your help!
Unfortunately no, that code sets a default amount, that’s not what I’m after. I’ll keep looking, thanks.
@wpcharitable ahh I see what I did, the filter charitable_campaign_donated_amount modifies the amount in the campaign summary, above the donor form (#1 in screenshot). I’m wanting to modify the current amount on the donor form itself – the displayed amount the donor is about to submit for payment (#2 in screenshot).
@wpcharitable perfect, that’s it. For others, this is the path (for this particular template): [childtheme]/charitable/donation-form/donation-amount-wrapper.php
Again, appreciate your help!
@wpcharitable this is perfect, thank you for taking the time to show this!
I can’t find where to put my custom file – can you tell me exactly where it needs to go under my child theme’s folder?
I tried several locations including:
[child-theme]/charitable/templates/donation-form/donation-amount-wrapper.php
[child-theme]/plugins/charitable/templates/donation-form/donation-amount-wrapper.php
[child-theme]/templates/donation-amount-wrapper.php
[child-theme]/donation-amount-wrapper.php@wpcharitable these hooks you mentioned render before/after the list of donation amount options.
charitable_donation_form_before_donation_amount
charitable_donation_form_before_donation_amounts
charitable_donation_form_after_donation_amount
charitable_donation_form_after_donation_amountsScreenshot 2024-03-26 125901.png
I’m looking for the area after the amount is chosen and displayed, before the donor changes it to a different amount (where the various pre-selected amounts are shown like here) – see my first post for the area on the page I’m inquiring about. Is there a hook available for that area? I can’t find one. I found ‘charitable_after_donation_amount_wrapper_header’ but this is directly after the header/before any of the section content.
I fixed the screenshot – is this the same spot you’re referring to?
I was able to get this working using the filter um_locate_user_profile_not_loggedin__redirect. I’m not sure the difference between the two filters, but my intent is to redirect a visitor to a specific page if they attempt to access a profile page that doesn’t exist… and the visitor is not logged in. This appears to do what I need but if you recommend I use um_redirect_home_custom_url instead, I’m not able to get that filter to be recognized in my code.
Andrew, can you provide some guidance on this? I don’t see the um_redirect_home_custom_url hook in the documentation, and my code is not catching this filter, which makes me think it doesn’t exist.
In what instances is the ‘Reveal in Modal’ option for the Donation Form Display Options under Settings used for then?
I’m creating campaigns via PHP, setting allow_custom_donations to 0 (see below), and when I view the campaigns in the UI, they are always created with allow_custom_donations as enabled/checked/true.
$args = array( 'title' => 'my campaign', 'creator' => 1, 'status' => 'publish', 'parent' => 0, 'suggested_donations' => array( array( 'amount' => 20 //'description' => '' ), array( 'amount' => 35 ), array( 'amount' => 50 ), array( 'amount' => 100 ), array( 'amount' => 250 ), array( 'amount' => 500 ), array( 'amount' => 1000 ) ), 'allow_custom_donations' => 0, ); $campaign_id = charitable_create_campaign( $args );This is perfect, thank you. I was able to use your sample to generate the form. However, I have my donate button configured to open the form in a modal window, but this form redirects me to the campaign page.
Thanks for your guidance. For others, I was able to accomplish this by using the charitable_donation_form_amount filter.