Customer communication automation is one of the key elements of a successful online store. With the ShopMagic PRO plugin, you can easily send automated emails to your customers, remind them about abandoned carts, or thank them for their purchases. However, even the best tools can sometimes face technical obstacles – especially when it comes to server or database configuration.
In this article, we’ll show you how one ShopMagic user encountered an error when trying to save an automation, what caused the issue, and how it was successfully resolved. It’s not only a practical example but also a valuable lesson for anyone looking to unlock the full potential of ShopMagic.
The issue: error when saving automation in ShopMagic PRO
A user of our ShopMagic PRO plugin contacted us because they were encountering the following errors when trying to save an automation with a custom HTML email template:
Fatal error while saving automation, Failed to set data for key _action
HTTP Error, Failed to set data for key _action
Interestingly, the error only occurred when using the “Send Email” or “Raw HTML” options. When switching to “Plain Text,” the automation saved without any issues. The user had already enabled debugging and increased PHP limits, but the debug.log
file showed no trace of the error.
Diagnosis: an invisible character encoding problem
After running some tests, the user identified the root cause – the email message they were trying to save contained emojis. Their database was set up with UTF8MB3
encoding, which does not support four-byte characters like emojis. As a result, the plugin could not store the data in the database, and the operation failed.
What solved the issue?
The fix was simple yet effective – the user changed the column encoding in the database to UTF8MB4
, and the automation saved without any errors.
This allowed the user to continue using ShopMagic PRO with fully customized messages, emojis, and advanced HTML formatting.
How to fix a similar issue on your own
If you ever run into a similar error when saving automations in ShopMagic PRO, here’s what you should check:
- Check the characters you’re using
Does your message contain emojis or unusual characters? Try saving a version without them – if it works, the issue is likely caused by your database encoding. - Inspect your database encoding
- Log into your database management tool (e.g., phpMyAdmin).
- Find the
wp_postmeta
table where ShopMagic stores data. - Make sure the relevant columns use the
utf8mb4_unicode_ci
(or at leastutf8mb4_general_ci
) collation.
If your database still uses
utf8
orutf8mb3
, consider upgrading toutf8mb4
to ensure full compatibility with four-byte characters. - Enable debug mode in ShopMagic
In the WordPress dashboard, go to ShopMagic → Settings and enable debug mode. This will help log any issues during automation execution.You can find more about debugging in ShopMagic’s documentation.
Why use ShopMagic?
ShopMagic is much more than just an email automation plugin. It offers a wide range of features that help WooCommerce store owners grow their sales and build lasting customer relationships:
- Intuitive automation builder – create workflows without writing any code.
- Multiple message formats – from simple plain text to advanced HTML templates with dynamic variables.
- Conditions and delays – send messages at the right time to the right people.
All of this makes ShopMagic a flexible tool for process automation in WooCommerce – suitable for both beginners and advanced users.
Summary & Takeaways
Technical issues like “Failed to set data for key _action” can often have non-obvious causes – such as incompatible database encoding. In this real case, a ShopMagic user solved the problem by switching the column encoding to utf8mb4
, which enabled saving messages with emojis.
Here’s what we can learn from this:
- It’s worth investigating errors step by step – don’t give up too quickly.
- ShopMagic is a powerful and flexible automation tool worth exploring.
- ShopMagic’s support and documentation can make troubleshooting much easier.
👉 Want to create high-converting email campaigns in WooCommerce? Try ShopMagic PRO today. And if you need help – our support team is here for you!