Your support had provided us with a code snippet that got some needed functionality working for us. Then we had another issue requiring another code snippet, which you provided for us as well. But the problem was the support person that added the 2nd snippet put it together in the same snippet with the first one because they could both be described by the title of that snippet, but these were two separate bits of functionality. I left it as is at the time because it worked for both features and I don't argue with success.
But now, I was preparing to submit another ticket that was going to require a modified version of the first snippet to make it work for the new needed feature. I decided to separate these two snippets into two different ones to avoid confusion with that so I could just point to the first one in asking my next question. The second snippet in there was totally separate from what I intended to ask. But now when I save both of them, I'm getting an error message on both. The error on the first one says:
-----------------------------------------------
syntax error, unexpected end of file in -----/wp-content/toolset-customizations/notification-recipients.php on line 48
A problem occurred when executing snippet "notification-recipients". The result of include_once is: ""
-----------------------------------------------
The error on the second one says:
-----------------------------------------------
[2023-07-06 01:48:41, frontend] syntax error, unexpected '}', expecting end of file in -----/wp-content/toolset-customizations/send-registration-notification-to-ride-leader.php on line 50
A problem occurred when executing snippet "send-registration-notification-to-ride-leader". The result of include_once is: ""
-----------------------------------------------
I've replaced the paths on the errors with ----- for security reasons.
The first snippet was set up to pull the e-mail addresses from a custom field (E-Mail) of a custom content type (Registrations) to make those the recipient list for a post form submission (Notifications).
The second snippet was set up to pull the e-mail address from a custom field (E-Mail) of a related content type (Ride Leaders) to make it a recipient for a post form submission (Registrations).
I decided to separate those into two different snippets to avoid confusion on what I intended to ask in my next ticket. But now I've broken both these snippets. I tried putting them back together, but when I pasted the second one back in with the first one, I'm still inexplicably getting an error with that as well. I don't understand why that's the case. Please help because now this functionality for both is broken on the live site.
Sorry about this. I didn't expect separating these to cause these errors.
The first code snippet is titled notification-recipients . The second code snippet I've newly added as where I wanted to put the second snippet that was previously in notification-recipients is titled send-registration-notification-to-ride-leader.
The reason for the confusion here is we have a custom content type called Notifications. But we also have notifications that come from post forms. The first one is a list of e-mail addresses to receive Notifications (the custom content type). The second one is an e-mail address (or two) that should receive notifications from a post form. That's why your support person decided to put the second one in together with the first one under notification-recipients, not realizing there were two different versions notifications being handled and that the second didn't have any relationship to the first.