WPCharitable
Forum Replies Created
-
@abcca Thanks – the source code helps a bit, although without seeing the page we can’t be 100% certain. But we took a screenshot of what we think is the code matching your earlier screenshot. https://a.supportally.com/i/8ohFok
While there is a Charitable <form> code there, the HTML that generates what we think is what you circled – “0.00” “donated” everything inside the div “campaign-single-summary” isn’t generated by Charitable (at least the core plugin). That’s the part you were referring to, and since that doesn’t appear to be Charitable generated, we can’t offer any suggestions. Again, the <form> ABOVE that is Charitable but appears just to be a button wrapped in a form and i’m not seeing that in your screenshot. And we can’t render the html just look at the source code.
“col-md-6” is a CSS class that would be coming from your theme, not Charitable. If you want you can privately share the link with us, but we’ve encountered these questions with this theme I believe before and have usually reached the same conclusions.
@abcca Thanks for reaching out.
We’ve had users use the Charity theme before, and the area you showed in the screenshot might not be generated by Charitable. To confirm you can share the actual link so we can look at the source code. If it’s not Charitable that might explain a few things you tried and didn’t work… and then you would need to ask these questions to the theme authors.
@jdowns1 Not sure if i question you are asking is coming off clear, but modal was intended for instances where Charitable generates the campaign page and not in edge and custom cases, at least officially. I hope that helps!
@jdowns1 Upon initial inspection (just checking quickly with your code) I can confirm what you see. For now, i’m going to send this to our developer team to confirm and (if this is a bug) apply a fix for the next release.
Meantime you can add this after the code and it should force the option to be 0 (unchecked), as I confirmed.
update_post_meta( $campaign_id, '_campaign_allow_custom_donations', '0' );I’m going to go ahead and close this ticket but I’ll update this when the release containing the bug (or if another explanation is discovered). Thanks!
@jdowns1 thanks for the update.
Sadly there really isn’t a clear way to do this with the modal window setting. You would have to add the needed JavaScript that creates the modal, plus a few other things that would involve a bit more development. That kind of support is beyond the scope of what we can offer here.
You are also free to look at the Charitable code library at WPCode: https://library.wpcode.com/profile/wpcharitable/
Thanks!
@rc2102 Thanks for update.
The code as shared works for us in our tests, so double check and make sure the snippet you provided doesn’t have any unusual characters or spaces and located in your functions.php file. The above error you are shown is usually a syntax error (a character is off or missing). If you are copy and pasting try re-typing to remove the chance there are any character issues.
We are going to go ahead and close this thread for now. But if you’d like us to assist further, please feel welcome to continue the conversation.
Thanks!
@rc2102 Thanks for reaching out.
So yes, in this instance you are correct – because by default Paypal tries to go back to the donation form of the campaign page if you cancel. When you cancel (typically, depending on setup) get back to not your shortcode page but this:
https://test.site/campaigns/my-campaign/donate/?donation_id=556&cancel=1It might be possible to change the cancel return via filtering out what Charitable sends to Paypal. There is a filter ‘charitable_paypal_redirect_args’ that’s found in charitable/includes/gateways/class-charitable-gateway-paypal.php. If you or your developer is familiar with WordPress filters, you might be able to drop something like this into your functions.php file in your theme:
add_filter( 'charitable_paypal_redirect_args', 'my_redirect_args', 10, 3); function my_redirect_args( $settings, $donation_id, $processor ) { $settings['cancel_return'] = 'https://www.mysitelink.com'; return $settings; }How you determine what to populate the return URL is up to you, but this would be the recommended way to attempt to change the cancel URL of Paypal. Hope this helps!
Wa are going to go ahead and close this thread for now. But if you’d like us to assist further, please feel welcome to continue the conversation.
Thanks!
@jdowns1 thanks for reaching out.
So the below function should show what you pass through (which if you look in the post meta for a campaign where you have a suggestion donation(s) and default, you’ll see the serialized versions of these).$args = array( 'title' => 'Test Campaign', 'suggested_donations' => array( array( 'amount' => 5, 'description' => 'gold' ) ), 'suggested_donation_amount' => array ( '$5.00' ), 'allow_custom_donations' => 1, );For more background information, you can check out the files charitable/includes/campaigns/class-charitable-campaign-processor.php. I hope this helps. Let me know if you have further questions.
I’m going to go ahead and close this thread for now. But if you’d like us to assist further, please feel welcome to continue the conversation.
Thanks!
@timothyrobinson thanks for reaching out.
First, let’s confirm it’s not a theme issue – does switching to a default WordPress theme make any difference (after clearing cache, etc.)?
The donation receipt page usually provides input after testing donation forms, not directly so as a next step you can share with us the steps to reproduce what you see on the site (and perhaps turn on test mode of make offline donations available) that would be great.
If you also want to activate debugging (WP_DEBUG and WP_DEBUG_LOG) and see if anything shows up in the logs when you follow your steps that might be potentially helpful. Thanks!
@styzer While some features of Charitable (and it’s addons) prefer someone registering and logging in, the basics (putting up a donation form and having someone fill it out) doesn’t require people registering and logging in. So you can ignore those settings and don’t need to add the shortcodes. Hope this helps!
I’m going to go ahead and close this thread for now. But if you’d like us to assist further, please feel welcome to continue the conversation.
Thanks!
Our team did test a plan fresh install with Charitable core plugin only in test mode and Stripe with PHP 8.2 and worked without issue. So a detailed error message would help things further here – hopefully with the DEBUG DISPLAY issue or additional information from the host. If you want to share credentials securely with our team to possible help further you may do so here.
I’m going to go ahead and close this thread for now. But if you’d like us to assist further, please feel welcome to continue the conversation.Thanks!