WPCharitable
Forum Replies Created
-
@aziz12345 We’ve rechecked the site again in Chrome, Firefox, and Safari on the desktop. Let us know what browser and if you are viewing this on a mobile device or desktop. Also try at least another browser to make sure you aren’t caching anything locally.
If the issue is “sometimes working and sometimes not” – often this is associated with some sort of caching issue. If you do not have a caching plugin, check with your hosting company if they have any caching systems running on your site (sometimes you can see this in a hosting control panel depending on the hosting company).
The next thing to try is if you can see it for yourself, disable all non-Charitable plugins, clear your browser cache, and refresh your browser. You can also try (while the plugins are deactivated) switching to a default WordPress theme (which likely came installed with your version of WordPress). That would help determine if your theme or third party plugins are causing some sort of conflict.
If you continue to see the issue after the above, try to take a screenshot of the web console area if you see any red error message. To add a screenshot to this support area you need to click the “+” and select the “image” block when you write your reply.
Thanks! I’ll try again in the next 12 hours to see if i can see the CC field not appear on the link.
@taxick the good news is that we now see it – it might have been a caching issue on our side or something you did.
the bad news is that it appears some CSS tricks that worked before adjusting the Stripe iframe which is added by JavaScript don’t appear to be working. the color CAN be passed to Stripe through their API but it’s something that Charitable currently doesn’t provide an easy way for users. It would require switching to a debug mode so you can edit a javascript file and either recompile the JavaScript file or leave your website in test mode. We can walk you through those instructions if you want to give it a try.
In the meantime, I’ll communicate the changes to Stripe customization to our team and see if we can get some sort of better method to customize this particular field of Stripe’s iframe to users.
Thanks! Let me know if there’s any other questions.
Hi @taxick,
We took a look at that same link and noticing there is no more Credit/Debit Card textbox field – doesn’t appear to be populated. Not sure what happened on your end – double check your Stripe Connection settings (make sure you aren’t using test or live if your Charitable isn’t set to test or live).
There might have been a typo in the CSS we supplied, so let’s try this next: remove the # from #white. Thanks!
@taxick thanks for reaching out. upon looking at your link this CSS will probably work for you:
.charitable-donation-form .custom-donation-input { color: black; }div#charitable_stripe_card_field { color: #white !important; }Because the Stripe CC fields are within an iFrame, this might make it more difficult, although the above SHOULD work as you can see in the screenshot. The CSS actually makes the div that contains the CC white. For donation forms – especially CC info – we do find that a light background with dark text works best and prevents the most input errors. In any case, hope the above helps!

- This reply was modified 3 years, 2 months ago by WPCharitable.
Thanks for reaching out @aziz12345.
We examined this donation form link in Chrome and Firefox and could see Stripe’s CC box when we clicked from PayPal to Stripe.

We saw no JavaScript errors in the console loading this page either or any signs of issue. The CC area showed and we could click on it and fill out the name and card number fields. The site is loading slowly for us but this shouldn’t be a factor. If this is an incorrect page to look at please provide a URL. If you see the problem again in the future:
(1) troubleshoot by first checking and seeing if you have any caching plugins or if your host is providing cache for you (if so disable or clear it and refresh the donation page) – (2) see if you can determine if any JavaScript errors are happening on the page by using a web dev console (generated by anything, including your theme), as often this prevents Stripe’s CC box from loading. If you see anything, take and share with us screenshots. (3) double check your Stripe payment gateway settings (4) see if the issue occurs if you are logged in or not, or in a private browser window and (5) make sure this isn’t an issue caused by your theme or other plugin… deactivate any non-Charitable plugins, clear your cache, and reload the donation page to see if you still get the issue.
Thanks!
@fepixie In terms of integrating with MailChimp, that’s a more complicated issue to address. That’s why we have a dedicated addon that addresses this but there is nothing currently we could recommend that would work with the free version of Charitable.
But it’s awesome we found the solution! glad we could resolve the issue and i’ll pass that suggestion to our developers (honestly this is a first but doesn’t hurt).
Thanks!
@fepixie thanks for this.
According to the log, nothing is being returned after get_date_format_from_option and this line of code it should be returning a value in your database WordPress options table:
$format = get_option( 'date_format' );Can you check in the wp_options table if the row date_form exists? For a typical WordPress install (at least in the US/English) the follow row exists:
option_name = date_format
option_value = F j,Y
autoload = yes
If you got to WordPress->general settings that is where one normally changes this value. Normally a pre-selected value is there based on the database value.@fepixie thanks for the information and sharing the screenshot. Sharing that also confirms the issue is happening anywhere Charitable attempts to display a date. Since it should look more like this:

I can understand not disturbing the site, and at least the dates are being recorded. If you can find a few minutes (after a backup if that reassures you) please try the theme/plugin test I mentioned to rule that out.
It’s odd that nothing has been written yet to debug.log in the wp-content – perhaps add:
error_log( "test" );to the functions.php to confirm it is writing to the log.
Once you confirmed the log is writing, our team suggest first to find the get_date() function in /charitable/includes/abstracts/abstract-class-charitable-abstract-donation.php. It’s a simple function that returns a formatted date of a donation. Replace the function with this one, which adds information to add to the error log:
public function get_date( $format = '' ) { error_log('get_date'); error_log( print_r( $format, true ) ); if ( empty( $format ) ) { error_log('get_date_format_from_option'); $format = get_option( 'date_format' ); error_log( print_r( $format, true ) ); } error_log( print_r( $this->donation_data, true ) ); error_log( print_r( $this->donation_data->post_date, true ) ); return date_i18n( $format, strtotime( $this->donation_data->post_date ) ); }Any time a date is needed from Charitable it should go through this function, so the error log should populate fairly quickly and hopefully lead to some further insights.
Donations for Charitable are custom post types stored in the wp_posts table (post_type=”donation”) and should have dates in the format as any WordPress post (example: “2022-10-10 23:18:27”). You can check this to confirm the records in the database haven’t been altered, although it’s unlikely unless a third party plugin or source has done that.
Speaking of third parties, if the data looks ok you might want to do a standard troubleshooting technique of making sure that the theme or a third party plugin isn’t part of the issue. If you can switch to a default WordPress theme and deactivate all non-Charitable plugins (preferably just have Charitable core plugin activated as well) to see if this changes anything that would help troubleshoot. This also removes the possibly of custom snippets in the theme or plugin from the equation. After this also checking the debug.log file as well.
After theme and plugins are deactivated you might want to do a sample test donation to see if the issue still exists just with core Charitable active.
Charitable should always be showing a particular date like “January 30, 2022” and not “this year”. So that is odd. Our team will try to look into this further and see if there’s any way you can add code or log something to be able to determine why this is happening. Thanks.
@fepixie thanks for sharing. that is odd, and don’t recall seeing this issue before. I’ll share this with the team but meantime can you turn on WP_DEBUG and WP_DEBUG_LOG and then access these pages again to see if anything is generated in the debug.log file that might be of use? This might also include making a test donation since it’s possible whatever it causing this might be happening on upon donation creation.
And also, is this happening to all donations even to those from the very beginning, when it would be assumed this issue wasn’t happening? Thanks.
Hello @fepixie,
Can you provide screenshots of some part of the donation list/details pages (try not to show any personal information)? Also can you share what general settings in Charitable you are using, along with information provided by the WordPress tools (the Site Health Site Info – you can click a button that copies information into the clipboard which can paste in here).
Also any background information and context is appreciated – when did this problem start (at the very start of you installing the plugin or some point after that, when was it working last, etc.).
Finally if you can share a URL to your site that might also help our team. Thanks!
@arikatech Glad we could help. I believe you were using the Reach theme previously? That SHOULD work just fine so i’m wondering if a fresh install of that theme before activating any non-Charitable plugins might work for you, or there is a needed tweak or adjustment on the server. But if you are good for now, that’s awesome. Thanks for using Charitable!
Hi @arikatech
Thanks for troubleshooting a bit on AutoOptimize. See if you can reset permalinks or retest w/ a default theme to see if that blank page might resolve. Even if there was a problem with Charitable, at least part of the page should load. Another possible test might be to create a new test campaign and see if the default donate page appears for that one (to determine if it’s just that donate page or all of them).
Another thing to try – since you can view campaign pages is to try changing the donation form “Display Options” setting in your general Charitable settings to “display on same page”.
As far as hiding the button, you should be able to use some sort of CSS likely this (or similar):
body.campaign-template-default button.donate-button { display: none; }Hi @arikatech
We can see the issue on this end when we click the “donate” button as well. That error message is generic produced by your server (and not PHP or Charitable) and we would be unsure why such an error would prevent you from loading the donate form page. There are some recommendations to move forward:
- Change your WordPress theme to a default theme to see if this changes anything. Deactivate all plugins but Charitable as well. This helps rule out a theme or third party plugin problem. You may also want to reset your permalink, to see if that has any effect.
- There would be more details about this error in your server logs, assuming the error logs are turned on. To make sure they are, you might need to turn on/true WP_DEBUG and WP_DEBUG_LOG (and WP_DEBUG_DISPLAY might force a better error message to display on screen). Here is how you can do it by editing your wp-config.php file (either you or your hosting company can edit this file, and your hosting company might also have access to logs to help determine more details as well). By checking the logs we can hopefully get more detailed error messages. If you need to turn logs on, you need to repeat the action so it records the errors into the logs.
- See if you can embed the donate form on a new page and see what happens. You can do this with the donate form shortcode. If this works, then this might be a (temp) workaround to displaying your donate form.
https://www.wpcharitable.com/documentation/add-your-donation-form-to-a-page/
If you can get results from the shortcode or get more information about the error from the logs please share that here and our team will take a closer look. Thanks!
@fabrizio83714 Wanted to update you on – based on some of the information you provided we have duplicated the conditions that produced this issue and should have a fix in the next release of Charitable. Thank you again and if you have any further questions let us know.