# yaymail/trunk/src/Utils/StyleInline.php

YayMail – WooCommerce Email Customizer, version trunk. 32 lines.

- Page: https://pluginprobe.com/plugins/yaymail/trunk/code/src/Utils/StyleInline.php
- Raw: https://pluginprobe.com/plugins/yaymail/trunk/raw/src/Utils/StyleInline.php
- Modified: 2025-06-03T12:23:12+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/yaymail/trunk/code/src/Utils/StyleInline.php#L10-L20`.

```php
<?php

namespace YayMail\Utils;

use YayMail\Utils\SingletonTrait;

/**
 * StyleInline utility class
 *
 * Extends WC_Email to use style_inline function
 *
 * @method static StyleInline get_instance()
 */
class StyleInline extends \WC_Email {

    use SingletonTrait;

    /**
     * Convert CSS to inline styles for email
     *
     * @param string $content HTML content to process
     * @return string HTML content with inline styles
     */
    public function convert_style_inline( $content ) {
        if ( empty( $content ) || ! is_string( $content ) ) {
            return $content;
        }

        return $this->style_inline( $content );
    }
}

```
