Disabling WP SMTP Mail in headless batch script
-
I’m migrating a site from a 3rd party e-commerce store to Woocommerce. As part of that process, I have to import/create order history from the previous platform. My order import script loads WordPress via wp-load.php and creates Woocommerce orders programatically.
Before we adopted WP SMTP Mail, I was able to filter wp_mail and redirect these historical order emails to a catch-all account by changing the “to” recipient email.
Once we started using WP SMTP Mail, that no longer worked. I’ve researched the WP SMTP Mail documentation and tried a number of approraches, including setting WPMS_ON and WPMS_DO_NOT_SEND constants to true in wp-config.php. Unfortunately, it has no effect on my headless script. Emails are still being sent via the SMTP account.
Any insights appreciated.
The topic ‘Disabling WP SMTP Mail in headless batch script’ is closed to new replies.