Automattic\WooCommerce\EmailEditor\Integrations\Utils
Table_Wrapper_Helper::render_outlook_table_wrapper
Render an Outlook-specific table wrapper using conditional comments.
Method of the class: Table_Wrapper_Helper{}
No Hooks.
Returns
String. The generated table wrapper HTML.
Usage
$result = Table_Wrapper_Helper::render_outlook_table_wrapper( $content, $table_attrs, $cell_attrs, $row_attrs, $render_cell ): string;
- $content(string) (required)
- The content to wrap (e.g., '{block_content}').
- $table_attrs(array)
- Table attributes to merge with defaults.
Default:array() - $cell_attrs(array)
- Cell attributes.
Default:array() - $row_attrs(array)
- Row attributes.
Default:array() - $render_cell(true|false)
- Whether to render the td wrapper (default true).
Default:true
Table_Wrapper_Helper::render_outlook_table_wrapper() Table Wrapper Helper::render outlook table wrapper code WC 10.4.3
public static function render_outlook_table_wrapper(
string $content,
array $table_attrs = array(),
array $cell_attrs = array(),
array $row_attrs = array(),
bool $render_cell = true
): string {
$content_with_outlook_conditional = '<![endif]-->' . $content . '<!--[if mso | IE]>';
return '<!--[if mso | IE]>' . self::render_table_wrapper( $content_with_outlook_conditional, $table_attrs, $cell_attrs, $row_attrs, $render_cell ) . '<![endif]-->';
}