Editing email template crashes site
-
I am using the Pro version of this plugin (Ultimate Woo Auction Pro – Business Annual) but the contact form on the plugin site is not working! (https://auctionplugin.net/contact-us/)
I’m the website developer for https://weavearealpeace.org
I’ve set up an auction with 200 auction products due to go live on Monday morning, and I’ve found a problem I cannot solve.
The client wants me to edit bid-outbided.php, making only minor changes to the HTML output only. For instance, removing this line:
<p><?php printf( __( "Hi %s,", 'woo_ua' ), $user_name); ?></p>
I copied bid-outbided.php from the plugin folder, removed that line, and uploaded the edited file to {theme}/woocommerce/emails
However, during testing, the site threw a fatal error and crashed whenever a user entered a higher bid (i.e., whenever the Outbid Notification email was to be sent).
The error is:
[14-Oct-2023 00:03:08 UTC] PHP Parse error: syntax error, unexpected 'if' (T_IF) in /home/warp2021/public_html/warp-stg-10-23/wp-content/themes/warp-theme/woocommerce/emails/bid-outbided.php on line 1
This relates to the standard PHP snippet preventing direct access:
if (!defined('ABSPATH')) { exit; }
If I comment out that line, no fatal error is thrown and the Outbid Notification email is sent. But that’s not a good idea for security reasons.
While troubleshooting, I discovered:
1) if I replaced bid-outbided.php file in plugins/ultimate-woocommerce-auction-pro/templates/woocommerce/emails with my edited v ersion (not a good practice, I know, but I’m desperate) the same fatal error occurs.
2) if I copied bid-outbided.php from the plugin folder to {theme}/woocommerce/emails WITHOUT CHANGING A THING, the same fatal error occurs.
What is wrong? How can this be fixed?
Like I said, 200 auction products are due to go live on Monday morning, so I really hope you can help me before then.
Thanks,
Denis Doyon
Samadhi Web Design
- The topic ‘Editing email template crashes site’ is closed to new replies.