Skip Navigation

[Resolved] Warning notice Cause by Toolset Form Commerce

This support ticket is created 2 years, 5 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 8 replies, has 2 voices.

Last updated by wilfredC 2 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#2401655
image (1).jpg

On the thank you page I see this warning in the billing/shipping section.

"Warning: Trying to access array offset on value of type null in /var/www/vhosts/xxxxxxxxxxxxxxxx/wp-content/plugins/cred-commerce/classes/CRED_Commerce.php on line 858"

You need to take a look and implement some if-else statements.

Thank

#2401875

Hello,

I have checked the source codes mentioned in your debug logs:
/var/www/vhosts/xxxxxxxxxxxxxxxx/wp-content/plugins/cred-commerce/classes/CRED_Commerce.php on line 858
It is below:

$form = $model->getForm($data['cred_form_id'], false);

That means it can not find the related Toolset post form.

Please follow our document to reset your post form:
https://toolset.com/course-lesson/charge-users-for-submitting-content/
If it is user form, please check below document:
https://toolset.com/course-lesson/charge-users-for-registering-premium-accounts/

#2403269

That should not have any form in the thank you page.
I did create a user form with commerce, but the form only displays on a certain page.

#2403357

I assume we are talking about these:
1) Your users are using Toolset user form to create the WordPress user account
2) After user submit the user form, you are going to charge the user for payment
If it is, Toolset Forms commerce plugin will trigger an function after user make the payment, it will update user account. See the document I mentioned above:
https://toolset.com/course-lesson/charge-users-for-registering-premium-accounts/#4-set-the-toolset-forms-commerce-options-to-charge-for-registration
section "4. Set the Toolset Forms Commerce options to charge for registration"
screenshot: https://toolset.com/wp-content/uploads/2020/06/toolset-forms-commerce-user-statuses.jpg

Please follow above document to reset the user form, and test again

#2403383

I already set the forms commerce, and what do you mean to reset the user form?

#2403411

You can try these:
1) Create another simple user form with forms commerce setting
2) Test it in frontend again.

If it is fixed without any PHP error, you might need to create the user form with same settings again.

#2406721

i create another user form with commerce setting, but the error remain

#2406749

The problem you mentioned above is abnormal, please check these:
1) deactivate all other plugins, and switch to WordPress default theme 2022, deactivate all custom PHP/JS code snippets, and test again
2) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, also point out the problem page URL and form URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#2408491

My issue is resolved now. Thank you!
Seem like the error didn't apply to the new order. Could be something set wrong in previously checkout