Simple Membership Plugin › Forums › Simple Membership Plugin › Critical error after payment taken
Tagged: critical error stripe payment
- This topic has 20 replies, 2 voices, and was last updated 3 years, 3 months ago by
LittleBigCJ.
-
AuthorPosts
-
February 25, 2023 at 7:27 pm #25579
LittleBigCJ
ParticipantHello,
For some reason, users of my site now see an error after Stripe payment taken: ‘There has been a critical error on this website.Learn more about troubleshooting WordPress.’I use the Stripe payments plugin to handle the payment. It is successfully taken and added to my stripe account. But I see this error:
Fatal error: Cannot redeclare swpm_handle_subsc_signup_stand_alone() (previously declared in /home/ochrgqja/aptipilot/wp-content/plugins/simple-membership/ipn/swpm_handle_subsc_ipn.php:3) in /home/ochrgqja/aptipilot/wp-content/plugins/simple-membership/ipn/swpm_handle_subsc_ipn.php on line 3
A user account is not created but payment is taken. Any ideas? Thanks
The wp debug.log shows the following:
[25-Feb-2023 18:16:56 UTC] PHP Notice: Trying to get property ‘membership_level’ of non-object in /home/ochrgqja/aptipilot/wp-content/plugins/swpm-show-member-info/swpm-show-member-info.php on line 55
[25-Feb-2023 18:16:56 UTC] PHP Notice: Trying to get property ‘alias’ of non-object in /home/ochrgqja/aptipilot/wp-content/plugins/simple-membership/classes/class.swpm-utils-membership-level.php on line 20
[25-Feb-2023 18:17:07 UTC] PHP Notice: Trying to get property ‘membership_level’ of non-object in /home/ochrgqja/aptipilot/wp-content/plugins/swpm-show-member-info/swpm-show-member-info.php on line 55
[25-Feb-2023 18:17:07 UTC] PHP Notice: Trying to get property ‘alias’ of non-object in /home/ochrgqja/aptipilot/wp-content/plugins/simple-membership/classes/class.swpm-utils-membership-level.php on line 20
[25-Feb-2023 18:17:19 UTC] PHP Notice: Trying to get property ‘membership_level’ of non-object in /home/ochrgqja/aptipilot/wp-content/plugins/swpm-show-member-info/swpm-show-member-info.php on line 55
[25-Feb-2023 18:17:19 UTC] PHP Notice: Trying to get property ‘alias’ of non-object in /home/ochrgqja/aptipilot/wp-content/plugins/simple-membership/classes/class.swpm-utils-membership-level.php on line 20
[25-Feb-2023 18:18:05 UTC] PHP Notice: Trying to get property ‘membership_level’ of non-object in /home/ochrgqja/aptipilot/wp-content/plugins/swpm-show-member-info/swpm-show-member-info.php on line 55
[25-Feb-2023 18:18:05 UTC] PHP Notice: Trying to get property ‘alias’ of non-object in /home/ochrgqja/aptipilot/wp-content/plugins/simple-membership/classes/class.swpm-utils-membership-level.php on line 20
[25-Feb-2023 18:18:37 UTC] PHP Fatal error: Cannot redeclare swpm_handle_subsc_signup_stand_alone() (previously declared in /home/ochrgqja/aptipilot/wp-content/plugins/simple-membership/ipn/swpm_handle_subsc_ipn.php:3) in /home/ochrgqja/aptipilot/wp-content/plugins/simple-membership/ipn/swpm_handle_subsc_ipn.php on line 3February 25, 2023 at 9:10 pm #25580LittleBigCJ
ParticipantI’ve just created a payment button for Simple membership, so not using the stripe plugin. After test payment it redirects to Thank you page but swpm log shows:
[2023/02/25 21:05:18] – SUCCESS: Stripe SCA Buy Now IPN received. Processing request…
but no user is ever created. It seems as though it’s the same issue with/without the stripe payment plugin so definitely somwething related to swpm. Thoughts would be greatly appreciated as I can’t take any payments on my site!
ThanksFebruary 25, 2023 at 9:44 pm #25581LittleBigCJ
ParticipantI’ve just deleted and reinstalled and the problem persists.
February 26, 2023 at 12:46 am #25586admin
KeymasterThis should be fixed in the new version that I have released. Please upgrade the plugin when you can.
February 26, 2023 at 6:23 am #25588LittleBigCJ
ParticipantThanks for your reply. I’ve just upgraded to 4.2.8 but I still get the error:
Fatal error: Cannot redeclare swpm_handle_subsc_signup_stand_alone() (previously declared in /home/ochrgqja/aptipilot/wp-content/plugins/simple-membership/ipn/swpm_handle_subsc_ipn.php:3) in /home/ochrgqja/aptipilot/wp-content/plugins/simple-membership/ipn/swpm_handle_subsc_ipn.php on line 3
February 27, 2023 at 2:10 am #25593admin
KeymasterThis “redeclare” error should not happen since we have added a function_exists check in there.
Can you delete the copy of the Simple Membership plugin and then add it again. You won’t lose any data that you have already configured in the plugin (for example: members, level, payment buttons, settings etc.). So it is okay to delete and re-add the plugin to make sure all the files are refreshed and no caching is happening.
February 27, 2023 at 8:04 am #25604LittleBigCJ
ParticipantI STILL get the error. I deactivated all other plugins except for:
Accept Stripe Payments
Simple Membership After Login Redirection
Simple Membership Custom Messages
Stripe Payments Addons Update Checker
Stripe Payments Country Autodetect
Stripe Payments Multi Currency Addon
SWPM Partial ProtectionI disabled W3 Total Cache amongst these. I then deleted and installed Simple membership. So only this and the plugins above were running. I opened an incognito window of another browser and still get the error above.
February 27, 2023 at 11:50 pm #25611admin
KeymasterThat’s strange. I can’t seem to be able to reproduce this. What version of PHP is being used on this server? If you go to the plugins menu of your admin dashboard, what version number does it show for the plugin?
I was noticing some caching issue with the plugin upgrade. After I clicked upgrade, it showed that it upgraded but later I went to the plugins menu, I found that it didn’t actually upgrade. So I want to make sure the same is not happening to you.
February 28, 2023 at 10:22 am #25626admin
KeymasterIf it still gives an error, please try downloading the following copy of the plugin and try that. Let me know if this one makes any difference:
https://simple-membership-plugin.com/wp-content/uploads/simple-membership.zipFebruary 28, 2023 at 12:24 pm #25629LittleBigCJ
ParticipantV4.2.9 Simple membership – shows on the plugins list.
Wordpress 6.1.1
PHP v7.4.33February 28, 2023 at 12:28 pm #25630LittleBigCJ
ParticipantI’ve just used my FTP to delete and copy the link above. Still get the error.
February 28, 2023 at 1:21 pm #25631admin
KeymasterSomething is strange on this site. Do you have a backup copy of the same plugin (kept from before) in the plugins directory? Some users keep a duplicate of the plugin (as a backup) which can create an issue.
Is there any caching on this site?
Do you have any staging/test site by any chance?
February 28, 2023 at 2:52 pm #25633LittleBigCJ
ParticipantNo backup copy. No test site (using WordPress). I’ve deleted Updraft and Duplicator (backup plugins)
Deleted Yoast. Can’t think what else it could be. I see a duplicate thread started at the same time. So not just my siteFebruary 28, 2023 at 3:08 pm #25634LittleBigCJ
ParticipantJust reinstalled Total Cache and empty all caches and still the error.
February 28, 2023 at 11:16 pm #25636admin
KeymasterThe error this site is still reporting cannot happen since the function is just not “re-declared” anymore in the new version that I pointed out above. I have verified that in the code multiple times. I am unsure whether the system is still accessing the cached version of the old file. I have previously encountered situations where a file gets cached on certain servers and remains stuck in that cached state, resulting in the old file being served repeatedly, even after multiple attempts to overwrite it.
There is a certain setup/configuration/conflict/situation on this site that is triggering this. I tried testing the Stripe checkout myself on PHP 7.4 and PHP 8.1. I just can’t see the same error. So I don’t know what specific setup/condition is causing the issue on this site 🙁
Are you using the following Stripe buttons or the old ones?
https://simple-membership-plugin.com/sca-compliant-stripe-buy-now-button/
or
https://simple-membership-plugin.com/sca-compliant-stripe-subscription-button/Can you post a link to the page containing the Stripe buttons so I can inspect it?
-
AuthorPosts
- You must be logged in to reply to this topic.