PluginProbe
YayMail – WooCommerce Email Customizer / 4.4.7
YayMail – WooCommerce Email Customizer v4.4.7
4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 trunk 1.9.6 2.1.4 2.1.5 3.2.2 3.2.6 3.2.7.1 3.2.8.1 3.2.9 3.3 3.3.1 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4 All 58 releases
← All changes | src/Abstracts/BaseSectionTemplate.php +9 -1 4.4.1 → 4.4.7 View file →
@@ -65,13 +65,21 @@
65 65 $this->patterns[] = $pattern;
66 66 }
67 67 }
68 68
69 + /**
70 + * Patterns are referenced by type only: their full data (elements included) is
71 + * already localized once in builder.patterns. Embedding it here too doubled the
72 + * inline yaymailData script to ~1MB, which some hosts truncate (ModSecurity
73 + * response limits, pcre.backtrack_limit in HTML optimizers) and the SPA then
74 + * never boots. SettingsPage::get_section_template_patterns_rehydrate_script()
75 + * swaps the types back to the objects client-side before any bundle runs.
76 + */
69 77 public function get_raw_data() {
70 78 $data = $this->get_data();
71 79 $data['patterns'] = array_map(
72 80 function( BasePattern $item ) {
73 - return $item->get_raw_data();
81 + return $item->get_type();
74 82 },
75 83 $data['patterns']
76 84 );
77 85 return $data;