Skip Navigation

[Resolved] Cred Commerce – Charging payments with CRED to register users errors

This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 17 replies, has 4 voices.

Last updated by Beda 6 years, 7 months ago.

Assisted by: Beda.

Author
Posts
#600012
debugging Cred Commerce - wrong user details in WC order.png

I am trying to: duplicate the tutorial at https://toolset.com/documentation/user-guides/charging-payments-with-cred-to-register-users/

Link to a page where the issue can be seen: ab.wpwh.nl

I expected to see: Users to be added

Instead, I got: Orders being generated in Woocommerce with numbers in stead of the user details

I followed the exact steps in the tutorial at https://toolset.com/documentation/user-guides/charging-payments-with-cred-to-register-users/
I repeated this on two different test sites.
The purchasing process of the membershipm product is completed. However, on a test site where I had set debug=true in wp-config I got this error upon clicking the final order button on the checkout page:

Warning: Illegal string offset 'cred_form_id' in /home/wpwhs/ab.wpwh.nl/wp-content/plugins/cred-commerce/classes/CRED_Commerce.php on line 740

I encountered the exact same error (only with the domain name different) on the other test account where I tried the tutorial, after I switched that site to debug on as well. This looks like a bug in Cred Commerce.

#600219

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Thanks for all information, do yo mean that when you complete the purchase, user is still not added to your site?

Or

The only issue you encountered is: The purchasing process of the membershipm product is completed. However, on a test site where I had set debug=true in wp-config I got this error upon clicking the final order button on the checkout page:

Warning: Illegal string offset 'cred_form_id' in /home/wpwhs/ab.wpwh.nl/wp-content/plugins/cred-commerce/classes/CRED_Commerce.php on line 740
#600223

Hello Minesh,

I encounter the following issues:

- The user is not added to the site
- The user details are replaced by numbers (see the screenshot from the Woocommerce order details)
- The warning is reported on the checkout page if I have debug=true set in wp-config.php

When I don't use Cred Commerce and just add a new user through a CRED form the user is added to the site allright.
So it seems to me the issues happen in the Cred Commerce stage.

Erik

#600814

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please send me exact step information to reproduce the issue.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#601582

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I'm working on it and I'll get in touch with you tomorrow.

#602012

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - I can confirm that once I finish the purchase I can see the warning:

Warning : Illegal string offset 'cred_form_id' in /home/wpwhs/ab.wpwh.nl/wp-content/plugins/cred-commerce/classes/CRED_Commerce.php on line 740

As well as Billing address is displaying malformed.

Could you please send me copy of your site using duplicator plugin:
=> https://toolset.com/faq/provide-supporters-copy-site/

I have set the next reply to private which means only you and I have access to it.

#602430

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I tried to create duplicator package on your install by installing duplicator plugin but somehow its not working may be it needs correct server settings.

It will be great if you can share duplicator copy of your site. Could you please send me copy of your site using duplicator plugin:
=> https://toolset.com/faq/provide-supporters-copy-site/

#602434

Minesh, as I wrote in my previous comment, I will send you a copy of the site if you let me know where to send it to. An e-mail address would be nice.

Erik

#602435

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I think you didn't read the Doc I shared for duplicator copy.

However - you can make copy of your site and upload it to any file sharing service (Dropbox) and share link to download it. If you still need my email address - minesh.s@onthegosystems.com

I have set the next reply to private which means only you and I have access to it.

#602954

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thanks for sharing all required details. I've escalated your issue to next level for further debug.

Please hold on for further updates.

#605995

I am Beda, from the 2nd Tier Support.
The error has been reported to us, and I found a solution for you.

1. I downloaded the Site's Copy (Duplicator package) and I see that the Form in question is set to:
- Purchase processing > Create user
- Purchase complete > Hide user
- Purchase refunded > Delete user
- Purchase cancelled > Delete user

Logically no user can be created like this.
You cannot see hidden users and with above settings you will never see an user.

I suggest to always use the opposite - hide on payment and create when done as it is by default.

Now, to solve the issue, please:

- In WooCommerce Settings ensure that the account creation is not managed by WooCommerce.
- Also disable "Automatisch een gebruikersnaam uit klant-e-mail genereren." and "Automatisch een klantwachtwoord genereren"
- Then, set up a fresh form with the Autogenerate Form Button
- Add the product to be purchased
- use the Form as a Guest.

It works fine on your Site's Copy

This issue surged due to a misconfiguration of the Plugin at first stage, which can be corrected as above outlined.

#607010
screenshot 1 from tutorial.png
screenshot 2 - order received.png
screenshot 3 - Woocommerce orders errors.png

Hi Beda,

I followed your exact instructions. Also the instruction "- Also disable "Automatisch een gebruikersnaam uit klant-e-mail genereren." and "Automatisch een klantwachtwoord genereren", which is opposite to the instructions in the tutorial, see screenshot 1.

I made a new form with the settings for Cred Commerce as you suggested
- Purchase processing > Hide user
- Purchase complete > Create user

Followed all the steps exactly the way they are described.

I still get the same error after submitting the order on the checkout - see screenshot 2.

In Woocommerce orders, I see the same error message - see screenshot 3

I'm stuck.

Could you give me access to your copy of the site so I can try to find what's wrong? Of send me the duplicate package back with your form in it so I can try it on my server?

Erik

#607527
Bildschirmfoto 2018-01-18 um 08.02.18.png

I tested this again, here is a full transcript of the steps.

1. Download package
2. Deploy package
3. Edit wp-config.php to add WP Debug and remove the customizations (CHMOD and Upload directory)
4. Delete Duplicator Data
5. Update WordPress and all Plugins of Toolset (By re-registering the site and updating in the Installer Tab)
6. Created a New Form and set the Product to be sold with it (I existed the Wizard for this step)
7. Edited WooCommerce Settings as shown in my post before (remove all account creation by WooCommerce)
8. Made sure that in Access the CRED Form is set to be read by guests
9. Submitted form as Guest.
==> No PHP errors are visible on Checkout
10. Complete Checkout (with "Rembours" payment method)
11. Confirmed the order in the backend, with the bulk actions (see also screenshot that all the data is right)
12. Confirmed no data is corrupt and user is created ==> OK

It all works great, unless I miss a crucial step.

Here is a Duplicator of this "new" site:
hidden link

Please create new Users upon the site's duplication.

#610127

Hi Beda,

Thanks for sending me the duplicator package. I installed it on 2 different servers and in both cases it worked ok. I haven't figured out yet what went wrong in my original test site, but at least now I know this is not a bug in Toolset.

All the best,
Erik

#696993

Same exact problem here.
Did anyone ever get to the bottom of this,

I am going to pull it all back to bare bones from the ground up.
Fresh install of WP
Then all the types plugins
Woo
and see what happens.