Automattic\WooCommerce\Internal\EmailEditor
WooContentProcessor::get_woo_content_styles
Get CSS styles specific to WooCommerce email content.
These styles target WooCommerce-specific HTML classes in the order details, totals, and other email content areas. They are needed because the WooCommerce email CSS selectors (prefixed with #body_content) do not match in the block email editor template structure.
Метод класса: WooContentProcessor{}
Хуков нет.
Возвращает
string. CSS styles.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_woo_content_styles(): string;
Список изменений
| С версии 10.8.0 | Введена. |
Код WooContentProcessor::get_woo_content_styles() WooContentProcessor::get woo content styles WC 11.2.2
private function get_woo_content_styles(): string {
return '
.email-order-details td,
.email-order-details th {
padding: 8px 12px;
}
.email-order-details td:first-child,
.email-order-details th:first-child {
padding-left: 0;
}
.email-order-details td:last-child,
.email-order-details th:last-child {
padding-right: 0;
}
.order-item-data td {
border: 0;
padding: 0;
vertical-align: middle;
}
.order-item-data img {
border-radius: 4px;
}
.order-totals th,
.order-totals td {
font-weight: 400;
padding-bottom: 5px;
padding-top: 5px;
}
.order-totals-total th {
font-weight: 700;
}
.order-totals-total td {
font-weight: 700;
font-size: 20px;
}
h2.email-order-detail-heading {
font-size: 20px;
font-weight: 700;
line-height: 1.6;
}
h2.email-order-detail-heading span {
font-size: 14px;
font-weight: 400;
color: #757575;
}
.email-order-item-meta {
font-size: 14px;
line-height: 1.4;
}
';
}