ShopMagic is a powerful plugin for WooCommerce that automates actions in your online store, such as sending notifications and managing orders. This article explains how to fix the “Fatal error while saving automation” issue in the ShopMagic plugin and how to set up the plugin properly to avoid future problems.
Situation/Challenge Description – Fatal Error While Saving Automation
Our client reported an issue when trying to save an email automation in the ShopMagic plugin. The error message “Fatal error while saving automation, Failed to set data for key _action” appeared only when he tried to set up an email with custom HTML (using the “Send Email” or “Raw HTML” options). Emails in “Plain Text” format worked fine.
Client had already changed PHP settings to allow larger packet sizes, but the problem still occurred. He also enabled debugging, but no useful information appeared in the logs.
Case Analysis and Solution for Fatal Error While Saving Automation
Step 1: Understand the Problem
We thought the issue might be related to incorrect database encoding, especially when emojis or special characters were used in the email. These types of errors often occur due to incompatible encoding that does not support certain characters.
Step 2: Test the Solution
We asked the client to perform several tests:
-
Check if the problem still occurs with only WooCommerce and ShopMagic active, while disabling all other plugins.
-
Review the database settings to ensure the encoding supports emojis and other characters.
Step 3: Final Solution
After reviewing the case, we found that the problem was caused by incorrect database encoding. Client used a database with UTF8mb3 encoding, which did not support characters like emojis. Once we changed the database encoding to UTF8MB4, the problem was solved.
Practical Tip:
Before using ShopMagic to send emails with custom HTML, make sure your database uses UTF8MB4 encoding. This encoding supports all characters, including emojis, and prevents issues when saving automations.
Summary and Conclusions
The ShopMagic plugin is an excellent tool for automating processes in your WooCommerce store. It helps save time and improve communication with customers. Make sure to set up your database correctly and use the proper encoding before installing the plugin.
We encourage you to try ShopMagic. If you encounter any issues, our technical support team will help you resolve any problems.
Check all the features of the plugin in our demo.
ShopMagic PRO €69
Free Follow-Up Emails & Marketing Automation for WooCommerce
Add to cart or View Details