E-Mail not sent when order is paid
-
Hello again,
when a customer makes a rent order, an email is sent to the customer himself/herself and to the admin mail.
But, even if i checked the “Reservation is pending or confirmed” in the <<configuration/orders tab/send emails when>> tab, the email is sent only on a new pending order, and not when the order is confirmed/paid.
I have the stripe addon aswell.
Wordpress V. 6.01
PHP V. 8.00Thanks for your help
-
Hello,
Thanks for contacting us. Your post is mainly referred to the commercial version of Vik Rent Items, which supports extra payment methods through WordPress plugins compatible with our framework. For this reason, it would be better if you could get in touch with our programmers through our website by opening a ticket so that we could assist you better.
The behavior you described is not normal, because the confirmation email is always sent to the customer when the status of a rental order changes from pending to confirmed after receiving a valid payment. As you’ve noticed, from the Configuration page you could choose to not send the email notification when the status is “pending” (“stand-by”), but when payments are received via front-end and the status changes to “Confirmed”, the email notification is always sent to the customer.
We know for sure that this is not an issue related to the combination of sender/recipient email addresses, because you said for the “Pending” status the email is correctly sent, and so the email sending functions must be working properly.
You said to be using our Stripe integration with PHP 8.0, and so we wonder if the issue could be caused by an outdated version of our Stripe integration, whose official SDK does not support PHP 8.0. The Stripe plugin should therefore be updated by using our plugin Vik Updater and by entering your purchase order number.
Alternatively, you can try to switch back to any PHP 7.x version to see if the issue is fixed, although our plugin Vik Rent Items is fully compatible with any PHP 8.x version. At today, using PHP 8 is still too early, because the first LTS release of PHP 8 will be the 8.2, which is not yet available as of today (August 2022). For this reason, using PHP 7.6, or any other version of the 7 series is definitely better.
As long as the status of a rental order changes automatically from “stand-by” to “confirmed” after receiving a valid payment placed through the front-end section of your website, the email notification must be sent automatically to the guest. Of course, if the status doesn’t change automatically to “Confirmed”, then it must be because of an error with the Stripe official PHP SDK not supporting your PHP version. This would cause a break of the execution process, and so it would explain why the email is not being sent to the customer.
We invite you to reach out to our support team through our dedicated support ticketing platform in case you keep having problems even after following these advises.
Thank you,
The VikWP TeamI tried updating, and it did.
I’ll check it, and if any further problems come up, I’ll be sure to send an email to your support.
In the meantime, thanks for the help!
Sorry to re-open, but upon further investigation i tried to manually set an order to “Fullfilled”, to try your fix.
The site went on critical error, and the log says:
Error details ==================== An error E_ERROR has been caused by line 23694 of the file mysite/wp-content/plugins/vikrentitems/site/helpers/tcpdf/tcpdf.php. Messaggio di errore: Uncaught TypeError: Cannot access offset of type string on string in mysite/wp-content/plugins/vikrentitems/site/helpers/tcpdf/tcpdf.php:23694 Stack trace: #0 mysite/wp-content/plugins/vikrentitems/site/helpers/tcpdf/tcpdf.php(23195): TCPDF->openHTMLTagHandler() #1 mysite/wp-content/plugins/vikrentitems/site/helpers/lib.vikrentitems.php(4185): TCPDF->writeHTML() #2 mysite/wp-content/plugins/vikrentitems/admin/controller.php(3825): VikRentItems::sendOrderEmail() #3 mysite/wp-content/plugins/vikrentitems/libraries/adapter/mvc/controller.php(323): VikRentItemsController->setordconfirmed() #4 mysite/wp-content/plugins/vikrentitems/libraries/system/body.php(55): JController->execute() #5 mysite/wp-content/plugins/vikrentitems/vikrentitems.php(186): VikRentItemsBody::process() #6 mysite/wp-includes/class-wp-hook.php(307): {closure}() #7 mysite/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #8 mysite/wp-includes/plugin.php(476): WP_Hook->do_action() #9 mysite/wp-settings.php(598): do_action() #10 mysite/wp-config.php(76): require_once('...') #11 mysite/wp-load.php(50): require_once('...') #12 mysite/wp-admin/admin.php(34): require_once('...') #13 mysite/wp-admin/index.php(10): require_once('...') #14 {main} thrown
I’ve substituted the url of my website with “mysite”, but all the rest is there. Sorry to re-open the thread, but i want to make sure that the solution is still about the premium plugin and not the base one.
Thank you for your time
Hello,
Thanks for sharing the error stack. That’s definitely an error with PHP 8.0 or 8.1, because PHP 7.x would not have raised such an E_ERROR. However, more than an incompatibility issue with your PHP version, this could be something related to the source code of the template file that after being converted to PDF content generated some parsing errors, where arrays became empty strings.
The error occurs within a common and third-party PHP class responsible for generating PDF documents, it’s called TCPDF, but this should be updated and fully compatible with most PHP 8 versions.
We also noticed that the server error is in Italian, and since we are an Italian company, it would be easier if you could get in touch with our technical support team directly through our website.
If the manual confirmation of a rental order generates that error message, then it may be possible that the source code of the template file for generating the PDF document is corrupted. It would be better to restore the original source code of the template file for the Customer PDF document in Vik Rent Items and try again. As we also said, downgrading to any PHP 7.x version would definitely solve the issue, but then the PDF document may be blank. Some tests would be needed in these cases.
The VikWP Team
- The topic ‘E-Mail not sent when order is paid’ is closed to new replies.