-
AuthorPosts
-
June 18, 2026 at 10:01 pm #260646

Christoph DurwenParticipantDear support team.
Products: Email Template Customizer for WooCommerce 1.3.1 (free) + WooCommerce Email Template Customizer Premium 1.3.0 (both active). Auto-update key valid until Nov 26 2026.
Environment: WordPress + WooCommerce, theme Hello Elementor. PHP: post_max_size 64M, max_input_vars 8192, time limit 899s, SUHOSIN off. No active WAF (Wordfence firewall disabled). Host: Dogado.
Problem: When saving an email template, the selected email type (viwec_settings_type) is not persisted and reverts to default. Because the server-side element sanitisation whitelists content per type against accept_elements[$type], the content is then validated against the default list — which does not contain type-specific premium elements. As a result, the WC Hook element (html/wc_hook) and email file attachments are silently removed on save. Base elements (text, button) survive because they exist in every whitelist.
Steps to reproduce (on a brand-new template, so it is not pre-existing data corruption):Create a new email template, set type to Completed order (customer_completed_order).
Add a WC Hook element (and/or add a file attachment).
Click Publish/Update.
Reload the editor → the type has reverted to “Default template”, and the WC Hook element / attachment is gone.Evidence:
The save POST to post.php returns HTTP 200 + redirect ?post=…&action=edit&message=1 (“Post updated”) — the request is fully accepted, it is not blocked.
Payload is base64-encoded, so it is not a WAF/mod_security content match.
Confirmed whitelist buckets: accept_elements[‘default’] → has_wc_hook: false; accept_elements[‘customer_completed_order’] → has_wc_hook: true.
Occurs identically on a fresh template and regardless of plugin version parity (also happened when base and premium were on the same version).Expected: The selected email type must persist on save, so the correct accept_elements[$type] list is applied and type-specific premium elements + attachments are retained.
Questions: Is this a known issue? Is there a fix/patch, or a reliable way to make the email-type assignment persist on save (so WC Hook and attachments are no longer stripped)?Regards
Christoph Durwen
Mail: info@magnetfeldexperte.de -
AuthorPosts
You must be logged in to see replies to this topic. Click here to login or register