WPCharitable
Forum Replies Created
-
Yes I can see how that wording in the description on Github might be not clear enough. The [charitable_stat] shortcode IS IN CORE but the plugin on Github ADDS TO THAT PLUGIN.
We are currently considering in our roadmap how we can enhance the built-in core shortcode and part of that will be adding the enhancements to that shortcode from the Github plugin into a future verison of core.
I’m glad installing that Github plugin worked. I’m going to mark this as resolved. Please let me know if you have any further questions. Have a good day! 🙂
You pointed to documentation of a plugin that ADDS functionality to the shortcode in Charitable core (https://www.wpcharitable.com/documentation/stats-shortcode/), so that’s why we assumed you were using it.
https://github.com/Charitable/Charitable-Stat-Shortcode
That is actually a plugin that adds “Installing this plugin will give you access to some new features, not currently available with Charitable.” Displaying the number of campaigns is in bold in that documentation on Github, and as the documentation states “Extra parameters added by this plugin are highlighted in bold.”
So if you aren’t using the plugin on Github, you need to download it and activate it on your site.
Again as a reminder snippets and plugins in the Github repo are not officially supported by Charitable support, but we’ll do out best to help. But if this plugin from Github wasn’t being used that explains your issue. 🙂
@rkovachev thanks for that error message. it’s very odd, since that error shouldn’t be generating at all from what we can tell.
Can you do the following? Can you open up this file:
plugins/Charitable-Stat-Shortcode/class-charitable-donation-report.phpConfirm that “campaigns” is in the following near the top of the file around line 45.
private $types = array( 'amount', 'donations', 'donors', 'campaigns', );If it is, for some unknown reason your input of “campaigns” isn’t matching up with that word. It’s something we cannot replicate the problem with.
If you can add two lines of code, clear your error log, and reload the front-end page a few times to generate additional information that might try to confirm our theory. These are the lines of code you can add around line 370, near the bottom of the file.
error_log( print_r( $report_type, true ) ); error_log( print_r( $this->types, true ) );So here’s what it looks like surrounding the code that is already there:
if ( is_array( $report_type ) ) { return $report_type; } error_log( print_r( $report_type, true ) ); error_log( print_r( $this->types, true ) ); if ( ! in_array( $report_type, $this->types ) ) { charitable_get_deprecated()->doing_it_wrongThis is simply information gathering and seeing if this gives us any remaining clues. If this doesn’t bare any new information we might have to find an alternate method outside of this plugin of counting the “campaign” custom post type posts.
Sidenote: Before all of this try surrounding the word campaigns with quotes in the shortcode and see if this makes any difference. If not, remove the quotes and see if you can do the above. Thank you!
@punkum thanks for the responses.
on the documentation below the mention to reach out to us… there is another section or two below that with some suggestions “Set your PayPal IPN manually” and “Next steps” – if you can try any of those suggestions, that might be of help (in addition to checking the PHP error logs). But you will require access to the Paypal account to examine and/or change the IPN manually.
@rkovachev thanks for showing how you added the shortcode – it is similar to the method I was trying. But does adding that shortcode on a blank page produce the same result?
Can you confirm what version of Charitable (and any other Charitable plugins outside of the stats shortcode) you might be running, and also check out the error logs as per my previous suggestion? I am hoping that gives us a clue.
@punkum thanks for reaching out.
So when you say “pending” you mean they are pending donations in Charitable? And what was the result of the test donation – was the IPN notification successful?
Did you also attempt to manually set the notification URL as per the documentation?
Can you give us more information about the Paypal account? Is it US based, what type of PayPal account, etc. Also can you confirm your permalink settings on your website, and if you are running any sort of “coming soon” plugin or anything that might be blocking incoming calls to your website?
Another suggestion might be to examine your PHP error logs to see if there is any errors being generated (more information on displaying errors on screen or in a log can be found here: https://ww.wp.xz.cn/support/article/debugging-in-wordpress/)
The methods for showing campaign total aren’t available in the [charitable_stat] shortcode. However you could try to display total information with the [campaign] shortcode:
https://www.wpcharitable.com/documentation/the-campaigns-shortcode/
So something like this:
[campaigns number=1 id=123]
Would display amount total, donated, and a progress bar in a “card” display (so you won’t get JUST the progress bar but with some CSS you can hide and/or adjust the look). See if this works for you.
Thanks for reaching out. I recently tested this personally on my Charitable 1.7.0.3 install and I did get a number to appear. I did the following:
– Created a shortcode block on a blank page.
– Added [charitable_stat display=campaigns]
– Published the page and I got a single number (for me it was 7).You didn’t mention how you were adding the shortcode – exactly what method are you trying? is it possible you can try this method? Note that this counts only published campaigns, not drafts.
You might want to confirm and view the source code to see if the number is being outputted but perhaps hidden by CSS or something else in your theme. You might also want to change to a default WordPress theme to confirm any issues are not related to your current theme.
Another suggestion might be to examine your PHP error logs to see if there is any errors being generated (more information on displaying errors on screen or in a log can be found here: https://ww.wp.xz.cn/support/article/debugging-in-wordpress/)
Please also note that snippets and plugins in the Github repo are not officially supported by Charitable support, but we’ll do out best to help.
Hello @punkum
1. I see you might be referring to this when you mention github snippet (if not direct me then to the location please):
All this does is output a template, so in theory you could copy this file in the plugin:
/plugins/charitable/templates/campaign/progress-bar.php
and paste it into your theme:
yourtheme/charitable/campaign/progress-bar.php
If you notice in PHP ‘get_percent_donated_raw’ is being outputted. If you added one or more of the following (and using HTML and CSS) you should be able to output more information including donation amounts:
<?php
echo $campaign->get_donated_amount();
echo $campaign->get_donated_amount_formatted();
echo $campaign->get_donation_summary();?>
Please note because the github snippets might be delayed in being updated to be fully compatible with the last version charitable, these snippets on Github are not officially supported. But the above should work.
2. According to the [charitable_stat] shortcode documentation (https://www.wpcharitable.com/documentation/stats-shortcode/) there isn’t an option to show a campaign’s total. I’ll rely this information to our team – this might be a nice feature to have.
Please let me know if you have any further questions or if I can help out further. 🙂
I tried following the link you provided but it was just a form, but I assume you are referring to the campaign page that lists number of donors, % campaign completed, etc (with the donation buttons).
There are a few ways to make the money total and donor amount not visible. The preferred way is to override the default templates. For example with
1. take the file plugins/charitable/templates/campaign/summary-donations.php and copy it to yourtheme/charitable/campaign/summary-donations.php. In the file remove the code that outputs the summary donations.
2. take the file plugins/charitable/templates/campaign/summary-donors.php and copy it to and yourtheme/charitable/campaign/summary-donors.php. in that file remove the code that outputs the summary donors.
You can also make the items not visible via CSS (adding to your theme or to additional CSS via the WordPress customizer) using something similar to this (this might vary slightly depending on your theme and it’s CSS):
.campaign-summary .campaign-donors.
.campaign-summary .campaign-figures {
display:none;
}I hope this helps. If you want additional assistance, please pass along the donation page and we’ll be happy to look further!
As discussed WPCharitable usually returns the message you first shared when Paypal when email being returned in Instant Payment Notification (IPN) doesn’t match the Paypal email in Charitable settings. So you can adjust the email setting in Charitable as a possible resolve. You also have the option of turning on/off the IPN on the same settings screen, although unusure with the limited information we have if that will resolve (it sounds like email).
I would also like to share this general PayPal IPN troubleshooting document in case you need it for the future: https://www.wpcharitable.com/documentation/paypal-ipn-troubleshooting/
Marking as resolved. Thanks @dutchdesign01!
@dutchdesign01 thanks for reaching out. you are asking for support with a paid addon for Charitable so for the best possible response I would encourage you to reach out to us via our website and create a support ticket. this forum is primarily used to assist those who are using the free version of Charitable. Thanks!
No problem at all. 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!
Hey @yllew – No problem, that sounds good. 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.