Prune elements with display none to fix regression.
In an earlier emogridier version (til WC 3.9.3) this was happening by default, however now we have to do this explicitly since we update emogrifier to > 3.x.
This commit is contained in:
parent
8ab5df1df2
commit
6612d1f859
|
@ -567,6 +567,9 @@ class WC_Email extends WC_Settings_API {
|
|||
do_action( 'woocommerce_emogrifier', $emogrifier, $this );
|
||||
|
||||
$content = $emogrifier->emogrify();
|
||||
$html_prune = \Pelago\Emogrifier\HtmlProcessor\HtmlPruner::fromHtml( $content );
|
||||
$html_prune->removeElementsWithDisplayNone();
|
||||
$content = $html_prune->render();
|
||||
} catch ( Exception $e ) {
|
||||
$logger = wc_get_logger();
|
||||
$logger->error( $e->getMessage(), array( 'source' => 'emogrifier' ) );
|
||||
|
|
Loading…
Reference in New Issue