After deploying the duplicate, logging in figures in an E500.
The error is:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 12288 bytes) in /types/vendor/toolset/toolset-common/expression-parser/parser.php on line 303
There is a memory issue (and my local server has enough memory), which seems to be consumed in Types, but it could happen anywhere, depending on which action comes last.
This happens even before I can see the login form, so it should be an issue on your side as well.
I was only able to reach the login screen, once I disabled the Types Plugin.
Then I could log in to the site, and was actually able to re-activate Toolset Types without related errors.
I see you have these Forms:
Canine Registration
Edit Abandoned Canine Registration
Renew or Upgrade Profile
Let me see if I understand all issues correctly:
1. When submitting Canine Registration, the post is "draft", but not paid immediately, and then later paid, it does not update to "Pending review".
2. The several email notifications (When post status changes to, X before the automatic expiration date and When the purchase status changes to) do NOT work IF the Form applies for payments? Is this correct?
To test this, I started with the Canine Registration Form, aborted payment, and completed it later using Edit Abandoned Canine Registration.
I installed a Mail Logging Plugin to track the mails and observed the statuses set.
I disabled ALL plugins but Toolset/WooCommerce, and used Theme Nineteen for these tests, for simplicity.
When submitting the Form (before paying, but after it redirected to the checkout), the new Dog is visible as a Draft in the backend.
I chose the Standard Listing ($27 for 3 Months)
No email is sent at this point as expected, but note, the Expiration date is already set, even the client did not yet pay-
The main issue here clearly is, the expiration date is set to 1st September 2019, but you say to send the notification 3 weeks ahead of expiration, so nothing can ever be sent (1st September is in one day, 3 weeks trigger is past).
I see you solve that with custom code on your site, and you update that EVERY time a field is added or updated.
I would suggest rather hooking this to a Toolset Forms API hook, for example cred_save_data or similar, so it's fired just once:
https://toolset.com/documentation/programmer-reference/cred-api/
I did not test your custom code locally, instead, I changed expiration dates to something testable (2 hours) and the notification to one hour ahead of that. I also changed to check every 5 minutes instead of daily.
Then I repeated the tests.
Again, before purchase a draft is created, no email sent, as expected.
The emails of this form say to be sent if the post is published before it expires, or when purchase changes to complete.
Hence I now purchased the product.
Of course, I had to disable Paypal, I cannot test this otherwise, so I used check payments.
I placed the order, at this point the email of WooCommerce is sent.
When I now complete payment, the emails of Forms are sent:
ATTN: Action Required! Dog Profile Registered (because the payment changed to complete), and again the WooCommerce email.
The Dog is Pending Review, correctly, and the notification for When post status changes to is not fired.
As soon I publish, it is fired.
Remains to wait for the expiration email, which should be fired from now on in about an hour.
Note, I updated the payment status in the backend, by editing the very order - you cannot do it within the orders list with the bulk actions, but need to edit the very order and set it to complete (so it fires the action as Forms listens to and updates the Post Status).
As far I see yet, this issue is likely due to another software or plugin, since with above tests until now all worked as expected.
Please do not hesitate to correct me if I am wrong in any of the steps.
I will udpate you here on expiration notifications as soon I receive (or not) it.