Commit inicial - WordPress Análisis de Precios Unitarios

- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-11-03 21:04:30 -06:00
commit a22573bf0b
24068 changed files with 4993111 additions and 0 deletions

View File

@@ -0,0 +1,243 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/** checking if woocommerce exists other wise return */
if ( ! function_exists( 'bwfan_is_woocommerce_active' ) || ! bwfan_is_woocommerce_active() ) {
return;
}
add_action( 'bwfan_output_email_style', function () { ?>
.bwfan-email-cart-table #template_header {
width: 100%;
}
.bwfan-email-cart-table table {
border: 2px solid #e5e5e5;
border-collapse: collapse;
max-width:700px;
}
.bwfan-email-cart-table table tr th, .bwfan-email-cart-table table tr td {
border: 2px solid #e5e5e5;
}
<?php } );
$subtotal = 0;
$subtotal_tax = 0;
$total = 0;
$text_align = is_rtl() ? 'text-align:right;' : 'text-align:left;';
$disable_product_thumbnail = BWFAN_Common::disable_product_thumbnail();
$currency = is_array( $data ) & isset( $data['currency'] ) ? $data['currency'] : '';
$lang = is_array( $data ) & isset( $data['lang'] ) ? $data['lang'] : '';
$colspan = ' colspan=2';
$colspan_foot = ' colspan=3';
if ( true === $disable_product_thumbnail ) {
$colspan = '';
$colspan_foot = ' colspan="2"';
}
do_action( 'bwfan_email_setup_locale', $lang );
/** Tax settings */
$tax_display = get_option( 'woocommerce_tax_display_cart' );
$tax_string = '';
if ( wc_tax_enabled() ) {
$tax_string = WC()->countries->tax_or_vat();
}
$suffix = BWFAN_Common::get_wc_tax_label_if_displayed();
$discount_total = 0;
if ( is_array( $data ) && ! empty( $data['coupons'] ) && is_array( $data['coupons'] ) ) {
foreach ( $data['coupons'] as $coupon ) {
if ( $tax_display === 'excl' ) {
$discount_total += ! empty( $coupon['discount_excl_tax'] ) ? $coupon['discount_excl_tax'] : 0;
} else {
$discount_total += ! empty( $coupon['discount_incl_tax'] ) ? $coupon['discount_incl_tax'] : 0;
}
if ( isset( $coupon['discount_tax'] ) && floatval( $coupon['discount_tax'] ) > 0 ) {
$subtotal_tax -= ! empty( $coupon['discount_tax'] ) ? $coupon['discount_tax'] : 0;
}
}
}
?>
<div class='bwfan-email-cart-table bwfan-email-table-wrap'>
<table cellspacing="0" cellpadding="6" border="1" width="100%">
<thead>
<th class="td" scope="col" <?php echo esc_html( $colspan ); //phpcs:ignore WordPress.Security.EscapeOutput ?> style="<?php echo esc_html( $text_align ); ?> white-space: nowrap;"><?php echo esc_html( 'Product', 'woocommerce' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></th>
<th class="td" scope="col" style="width:90px;text-align:center;white-space: nowrap;"><?php esc_html_e( 'Quantity', 'woocommerce' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></th>
<th class="td" scope="col" style="width:90px;text-align:center;white-space: nowrap;"><?php esc_html_e( 'Price', 'woocommerce' ); // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?></th>
</thead>
<tbody>
<?php
if ( false !== $cart ) {
$cartItemLinkEnabled = apply_filters( 'bwfan_block_editor_enable_cart_item_link', true );
foreach ( $cart as $item ) :
$product = isset( $item['data'] ) ? $item['data'] : '';
if ( empty( $product ) || ! $product instanceof WC_Product ) {
continue;
}
// Calculate prices based on tax display setting
$line_total = ( $tax_display === 'excl' ) ? BWFAN_Common::get_line_subtotal( $item ) : BWFAN_Common::get_line_subtotal( $item ) + BWFAN_Common::get_line_subtotal_tax( $item );
$subtotal += $line_total;
$subtotal_tax += BWFAN_Common::get_line_subtotal_tax( $item );
?>
<tr>
<?php if ( false === $disable_product_thumbnail ) : ?>
<td class="image" style="width: 15%;min-width: 40px;">
<?php if ( true === $cartItemLinkEnabled ) :
$cartItemLink = BWFAN_Common::decode_merge_tags( apply_filters( 'bwfan_block_editor_alter_cart_item_link', '{{cart_recovery_link}}' ) );
?>
<a href="<?php echo esc_url( $cartItemLink ); ?>" target="_blank">
<?php echo wp_kses_post( BWFAN_Common::get_product_image( $product, 'thumbnail', false, 100 ) ); ?>
</a>
<?php else : ?>
<?php echo wp_kses_post( BWFAN_Common::get_product_image( $product, 'thumbnail', false, 100 ) ); ?>
<?php endif; ?>
</td>
<?php endif; ?>
<td style="width: 60% !important;">
<h4 style="vertical-align:middle; <?php echo esc_html( $text_align ); ?> word-wrap: break-word;">
<?php echo wp_kses_post( BWFAN_Common::get_name( $product ) ); ?>
</h4>
</td>
<td style="vertical-align:middle; <?php echo esc_html( $text_align ); ?> white-space: nowrap;">
<?php
if ( false === BWFAN_Merge_Tag_Loader::get_data( 'is_preview' ) ) {
echo esc_html( BWFAN_Common::get_quantity( $item ) );
} else {
echo esc_html( 1 );
}
?>
</td>
<td style="vertical-align:middle; <?php echo esc_html( $text_align ); ?> white-space: nowrap;">
<?php echo wp_kses_post( BWFAN_Common::price( $line_total, $currency ) ); ?>
<?php if ( false === BWFAN_Merge_Tag_Loader::get_data( 'is_preview' ) && wc_tax_enabled() && ! empty( $suffix ) ) : ?>
<small><?php echo $suffix; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></small>
<?php endif; ?>
</td>
</tr>
<?php endforeach;
} else {
foreach ( $products as $product ) {
?>
<tr>
<?php if ( false === $disable_product_thumbnail ) : ?>
<td class="image" width="100">
<?php echo wp_kses_post( BWFAN_Common::get_product_image( $product, 'thumbnail', false, 100 ) ); ?>
</td>
<?php endif; ?>
<td>
<h4 style="vertical-align:middle; <?php echo esc_html( $text_align ); ?> white-space: nowrap;"><?php esc_html_e( 'Test Product', 'wp-marketing-automations' ); ?></h4>
</td>
<td style="vertical-align:middle; <?php echo esc_html( $text_align ); ?> white-space: nowrap;">1</td>
<td style="vertical-align:middle; white-space: nowrap;"><?php echo wp_kses_post( BWFAN_Common::price( 0, $currency ) ); ?></td>
</tr>
<?php
}
}
?>
</tbody>
<tfoot>
<tr>
<th scope="row" <?php echo esc_html( $colspan_foot ); ?> style="<?php echo esc_html( $text_align ); ?>">
<?php esc_html_e( 'Subtotal', 'woocommerce' );// phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?>
</th>
<td>
<?php echo wp_kses_post( BWFAN_Common::price( $subtotal, $currency ) ); ?>
<?php if ( false === BWFAN_Merge_Tag_Loader::get_data( 'is_preview' ) && wc_tax_enabled() && ! empty( $suffix ) ) : ?>
<small><?php echo $suffix; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></small>
<?php endif; ?>
</td>
</tr>
<?php if ( is_array( $data ) && isset( $data['shipping_total'] ) && ! empty( $data['shipping_total'] ) && '0.00' !== $data['shipping_total'] ) :
$shipping_total = ( $tax_display === 'excl' ) ? $data['shipping_total'] : $data['shipping_total'] + ( $data['shipping_tax_total'] ?? 0 );
$shipping_tax = $data['shipping_tax_total'] ?? 0;
if ( ! empty( $shipping_tax ) ) {
$subtotal_tax += floatval( $shipping_tax );
}
?>
<tr>
<th scope="row" <?php echo esc_html( $colspan_foot ); ?> style="<?php echo esc_html( $text_align ); ?>">
<?php esc_html_e( 'Shipping', 'woocommerce' );// phpcs:ignore WordPress.WP.I18n.TextDomainMismatch
?>
</th>
<td><?php echo BWFAN_Common::price( $shipping_total, $currency ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
<?php if ( false === BWFAN_Merge_Tag_Loader::get_data( 'is_preview' ) && wc_tax_enabled() && ! empty( $suffix ) && $shipping_tax > 0 ) : ?>
<small><?php echo $suffix; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></small>
<?php endif; ?>
</td>
</tr>
<?php endif; ?>
<?php if ( $discount_total > 0 ) : ?>
<tr>
<th scope="row" <?php echo esc_html( $colspan_foot ); ?> style="<?php echo esc_html( $text_align ); ?>">
<?php esc_html_e( 'Discount', 'woocommerce' );// phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?>
</th>
<td>-<?php echo BWFAN_Common::price( $discount_total, $currency );//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></td>
</tr>
<?php endif; ?>
<?php if ( is_array( $data ) && isset( $data['fees'] ) && ! empty( $data['fees'] ) ) :
foreach ( $data['fees'] as $fee ) {
if ( ! isset( $fee->name ) || empty( $fee->total ) ) {
continue;
}
$fee_total = ( $tax_display === 'excl' ) ? $fee->total : $fee->total + ( $fee->tax ?? 0 );
if ( ! empty( $fee->tax ) ) {
$subtotal_tax += floatval( $fee->tax );
}
?>
<tr>
<th scope="row" <?php echo esc_html( $colspan_foot ); ?> style="<?php echo esc_html( $text_align ); ?>">
<?php echo esc_html( $fee->name ?: __( 'Fee', 'wp-marketing-automations' ) ); ?>
</th>
<td><?php echo BWFAN_Common::price( $fee_total, $currency ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></td>
</tr>
<?php }
endif; ?>
<?php if ( wc_tax_enabled() && $tax_display === 'excl' && $subtotal_tax ) : ?>
<tr>
<th scope="row" <?php echo $colspan_foot; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> style="<?php echo esc_html( $text_align ); ?>">
<?php echo esc_html( $tax_string ); ?>
</th>
<td><?php echo wp_kses_post( BWFAN_Common::price( $subtotal_tax, $currency ) ); ?></td>
</tr>
<?php endif; ?>
<tr>
<th scope="row" <?php echo $colspan_foot; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> style="<?php echo esc_html( $text_align ); ?>">
<?php esc_html_e( 'Total', 'woocommerce' );// phpcs:ignore WordPress.WP.I18n.TextDomainMismatch ?>
<?php if ( false === BWFAN_Merge_Tag_Loader::get_data( 'is_preview' ) && wc_tax_enabled() && $tax_display !== 'excl' ) : ?>
<small><?php printf( __( '(includes %s Tax)', 'woocommerce' ), BWFAN_Common::price( $subtotal_tax, $currency ) );// phpcs:ignore WordPress.WP.I18n.TextDomainMismatch, WordPress.WP.I18n.MissingTranslatorsComment, WordPress.Security.EscapeOutput.OutputNotEscaped ?></small>
<?php endif; ?>
</th>
<td>
<?php
$final_total = $subtotal;
if ( isset( $shipping_total ) ) {
$final_total += $shipping_total;
}
if ( ! empty( $data['fees'] ) ) {
$final_total += $fee_total;
}
if ( $tax_display === 'excl' ) {
$final_total += $subtotal_tax;
}
if ( $discount_total > 0 ) {
$final_total -= $discount_total;
}
echo wp_kses_post( BWFAN_Common::price( $final_total, $currency ) );
?>
</td>
</tr>
</tfoot>
</table>
</div>

View File

@@ -0,0 +1,169 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$font_size = absint( apply_filters( 'bwfan_email_text_font_size', 15 ) );
$font_size = ( $font_size > 9 && $font_size < 31 ) ? $font_size : 15;
$bg = '#ffffff';
$body = '#ffffff';
$base = '#ffffff';
$base_text = '#000000';
$text = '#000000';
$link_color = '#045fb4';
$bg_darker_10 = '#e5e5e5';
$body_darker_10 = '#e5e5e5';
$base_lighter_20 = '#ffffff';
$base_lighter_40 = '#ffffff';
$text_lighter_20 = '#333333';
$text_lighter_40 = '#666666';
// !important; is a gmail hack to prevent styles being stripped if it doesn't like something.
// body{padding: 0;} ensures proper scale/positioning of the email in the iOS native email app.
ob_start();
?>
.bwfan-email-table-wrap table {
margin: 0 0 16px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.bwfan-email-table-wrap table td {
padding: 5px 12px;
vertical-align: middle;
}
.bwfan-email-table-wrap table td td {
padding: 12px;
}
.bwfan-email-table-wrap table td th {
padding: 12px;
}
.bwfan-email-table-wrap h1, .bwfan-email-table-wrap h2, .bwfan-email-table-wrap h3, .bwfan-email-table-wrap h4 {
margin: 0 0 16px;
line-height: 130%;
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
}
.bwfan-email-table-wrap h1 {
font-size: <?php echo( absint( $font_size ) + 6 ); ?>px;
}
.bwfan-email-table-wrap h2 {
font-size: <?php echo( absint( $font_size ) + 3 ); ?>px;
}
.bwfan-email-table-wrap h3 {
font-size: <?php echo( absint( $font_size + 1 ) ); ?>px;
}
.bwfan-email-table-wrap h4 {
font-size: <?php echo( absint( $font_size - 1 ) ); ?>px;
font-weight: normal;
}
.bwfan-email-table-wrap h1:last-child, .bwfan-email-table-wrap h2:last-child, .bwfan-email-table-wrap h3:last-child, .bwfan-email-table-wrap h4:last-child {
margin: 0;
}
.bwfan-email-table-wrap p {
margin: 0 0 16px;
line-height: 1.5;
font-size: <?php echo absint( $font_size ); ?>px;
}
.bwfan-email-table-wrap ul {
display: block;
list-style-type: disc;
margin-block-start: 15px;
margin-block-end: 15px;
margin-inline-start: 0px;
margin-inline-end: 0px;
padding-inline-start: 30px;
}
.bwfan-email-table-wrap li {
margin: 0 0 10px;
display: list-item;
font-size: <?php echo absint( $font_size ); ?>px;
}
.bwfan-email-table-wrap a {
color: <?php echo esc_attr( $link_color ); ?>;
font-weight: normal;
text-decoration: underline;
display: inline-block;
}
.bwfan-email-table-wrap img {
border: none;
display: inline-block;
height: auto;
outline: none;
vertical-align: middle;
margin: 0;
max-width: 100%;
}
.bwfan-email-product-2-col.bwfan-email-table-wrap .bwfan-product-grid-item-2-col img,
.bwfan-email-product-3-col.bwfan-email-table-wrap .bwfan-product-grid-item-3-col img {
padding-top: 20px;
}
.bwfan-email-table-wrap img.aligncenter {
display: block;
margin: 0 auto;
}
.bwfan-email-table-wrap img.alignleft {
float: left;
margin: 0.5em 1em 0.5em 0;
}
.bwfan-email-table-wrap img.alignright {
float: right;
margin: 0.5em 0 0.5em 1em;
}
.bwfan-email-table-wrap .bwfan-product-grid-container img.bwfan-product-image {
margin-bottom: 15px;
}
.bwfan-email-table-wrap .autonami-button {
font-weight: bold;
border-radius: 4px;
display: inline-block;
padding: 12px 20px;
margin: 8px auto;
font-size: 14px;
text-align: center;
text-decoration: none;
}
img{
max-width:100%;
}
@media screen and (max-width:600px){
.bwfan-email-cart-table td.image {
padding: 2px!important;
}
.bwfan-email-cart-table td img {
min-width: 25px!important;
}
}
<?php
$default_css = ob_get_clean();
if ( true === apply_filters( 'bwfan_display_email_default_css', true ) ) {
echo $default_css; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
/** Without style tag */
do_action( 'bwfan_output_email_style' );

View File

@@ -0,0 +1,201 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$max_width = absint( apply_filters( 'bwfan_email_raw_width', 600 ) );
$max_width = ( $max_width > 300 ) ? $max_width : 600;
$font_size = absint( apply_filters( 'bwfan_email_text_font_size', 15 ) );
$font_size = ( $font_size > 9 && $font_size < 31 ) ? $font_size : 15;
$bg = '#ffffff';
$body = '#ffffff';
$base = '#ffffff';
$base_text = '#000000';
$text = '#000000';
$link_color = '#045fb4';
$bg_darker_10 = '#e5e5e5';
$body_darker_10 = '#e5e5e5';
$base_lighter_20 = '#ffffff';
$base_lighter_40 = '#ffffff';
$text_lighter_20 = '#333333';
$text_lighter_40 = '#666666';
// !important; is a gmail hack to prevent styles being stripped if it doesn't like something.
// body{padding: 0;} ensures proper scale/positioning of the email in the iOS native email app.
ob_start();
?>
body {
padding: 0 15px;
direction:<?php echo is_rtl() ? 'rtl' : 'ltr'; ?>;
}
#body_content {
background-color: <?php echo esc_attr( $body ); ?>;
width: 100%;
max-width: <?php echo esc_attr( $max_width ); ?>px;
direction: <?php echo is_rtl() ? 'rtl' : 'ltr'; ?>;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
#body_content.bwfan-email-preview{
padding: 30px;
}
#body_content table {
margin: 0 0 16px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
#body_content table td {
padding: 10px 10px;
}
#body_content table td td {
padding: 12px;
}
#body_content table td th {
padding: 12px;
}
#body_content h1, #body_content h2, #body_content h3, #body_content h4 {
margin: 0 0 16px;
line-height: 130%;
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
}
#body_content h1 {
font-size: <?php echo( absint( $font_size ) + 6 ); ?>px;
}
#body_content h2 {
font-size: <?php echo( absint( $font_size ) + 3 ); ?>px;
}
#body_content h3 {
font-size: <?php echo( absint( $font_size + 1 ) ); ?>px;
}
#body_content h4 {
font-size: <?php echo( absint( $font_size - 1 ) ); ?>px;
font-weight: normal;
}
#body_content h1:last-child, #body_content h2:last-child, #body_content h3:last-child, #body_content h4:last-child {
margin: 0;
}
#body_content p {
margin: 0 0 16px;
line-height: 1.5;
font-size: <?php echo esc_attr( $font_size ); ?>px;
}
#body_content ul, #body_content ol {
display: block;
list-style-type: disc;
margin-block-start: 15px;
margin-block-end: 15px;
margin-inline-start: 15px;
margin-inline-end: 0px;
padding-inline-start: 30px;
list-style: initial;
}
#body_content li {
margin: 0 0 10px;
display: list-item;
font-size: <?php echo esc_attr( $font_size ); ?>px;
list-style: initial;
}
#body_content strong{
font-weight: 600;
}
.td {
color: <?php echo esc_attr( $text_lighter_20 ); ?>;
border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>;
vertical-align: middle;
}
.address {
padding: 12px;
color: <?php echo esc_attr( $text_lighter_20 ); ?>;
border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>;
}
.text {
color: <?php echo esc_attr( $text ); ?>;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.link {
color: <?php echo esc_attr( $base ); ?>;
}
#header_wrapper {
padding: 36px 48px;
display: block;
}
a {
color: <?php echo esc_attr( $link_color ); ?>;
font-weight: normal;
text-decoration: underline;
display: inline-block;
}
img {
border: none;
display: inline-block;
height: auto;
outline: none;
vertical-align: middle;
margin: 0;
max-width: 100%;
}
img.aligncenter {
display: block;
margin: 0 auto;
}
img.alignleft {
float: left;
margin: 0.5em 1em 0.5em 0;
}
img.alignright {
float: right;
margin: 0.5em 0 0.5em 1em;
}
.bwfan-product-grid-container img.bwfan-product-image {
margin-bottom: 15px;
}
.autonami-button {
font-weight: bold;
border-radius: 4px;
display: inline-block;
padding: 12px 20px;
margin: 8px auto;
font-size: 14px;
text-align: center;
text-decoration: none;
}
<?php
$default_css = ob_get_clean();
if ( true === apply_filters( 'bwfan_display_email_default_css', true ) ) {
echo $default_css; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
/** Without style tag */
do_action( 'bwfan_output_email_style' );

View File

@@ -0,0 +1,153 @@
<?php
$bg_color = '#EBF7FF';
$text_color = '#000000';
$btn_bg_color = '#09B29C';
$btn_text_color = '#fff';
if ( 'dark' === $theme ) {
$bg_color = '#131144';
$text_color = '#fff';
$btn_bg_color = '#FFC65C';
$btn_text_color = '#000';
}
?>
<table cellpadding="0" cellspacing="0" border="0" bgcolor="" align="center" role="presentation"
class="bwfbe-block-section-container bwfbe-block-section bwfbe-block-4bf2f08"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; width: 640px;"
width="640">
<tbody>
<tr style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; background-color: <?php echo esc_html( $bg_color ); ?>;"
bgcolor="<?php echo esc_html( $bg_color ); ?>">
<!--[if mso | IE]>
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:100%" role="presentation" width="640">
<tr>
<td style="line-height:0;font-size:0;-mso-line-height-rule:exactly"><![endif]-->
<div class="bwfbe-block-section-outer-container"
style="margin: 0 auto; width: 640px; background-color: <?php echo esc_html( $bg_color ); ?>;">
<table cellpadding="0" cellspacing="0" border="0" align="center"
style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: normal; background-color: <?php echo esc_html( $bg_color ); ?>; width: 100%; border-collapse: separate;"
role="presentation" width="100%" class="bwfbe-block-section-inner-container" bgcolor="<?php echo esc_html( $bg_color ); ?>">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td
style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; font-size: 0px; border-collapse: separate; padding: 36px; mso-padding-alt: 36px;">
<!--[if mso | IE]>
<table cellpadding="0" cellspacing="0" border="0" style="width:100%;border-collapse:separate" role="presentation">
<tbody>
<tr><![endif]--><!--[if mso | IE]>
<td style="width: 568px;vertical-align: top;" valign="top"><![endif]-->
<div class="bwf-email-inner-column-wrapper bwf-email-inner-column-wrapper-a8a472e"
style="font-size: 0px; border-collapse: separate; display: table-cell; vertical-align: top; mso-border-alt: none; width: 568px;">
<table cellpadding="0" cellspacing="0" border="0"
style="border-spacing: 0px; border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;"
role="presentation"
class="bwf-email-inner-column bwf-email-inner-column-a8a472e" width="100%">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="bwf-email-text bwf-email-text-15ea1e0"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; padding: 0px 0px 8px 0px; word-break: break-word;">
<div class="bwf-block-text-container"
style="text-align: center; font-size: 14px; font-family: arial,helvetica,sans-serif; line-height: 1.5; color: #ff6900;">
<p class="bwf-block-text-inner-container"
style="margin: 0; mso-line-height-alt: 150%; word-break: break-word; font-size: 14px; font-family: arial,helvetica,sans-serif; line-height: 1.5;">
<span
style="mso-line-height-alt: 150%; background-color: rgba(0, 0, 0, 0); color: <?php echo esc_html( $text_color ); ?>;"
class="has-inline-color">
<strong>
<span
style="mso-line-height-alt: 150%; font-size: 16px;"
class="has-font-size">
<?php echo $date; //phpcs:ignore WordPress.Security.EscapeOutput ?>
</span>
</strong>
</span>
</p>
</div>
</td>
</tr>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="bwf-email-text bwf-email-text-abfa5fc"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; padding: 0px 0px 8px 0px; word-break: break-word;">
<div class="bwf-block-text-container"
style="text-align: center; font-size: 14px; font-family: arial,helvetica,sans-serif; line-height: 1.5; color: #ff6900;">
<p class="bwf-block-text-inner-container"
style="margin: 0; mso-line-height-alt: 150%; word-break: break-word; font-size: 14px; font-family: arial,helvetica,sans-serif; line-height: 1.5;">
<span
style="mso-line-height-alt: 150%; background-color: rgba(0, 0, 0, 0); color: <?php echo esc_html( $text_color ); ?>;"
class="has-inline-color"><span
style="mso-line-height-alt: 150%; font-size: 36px;"
class="has-font-size">
<strong><?php echo wp_strip_all_tags( $title ); //phpcs:ignore WordPress.Security.EscapeOutput ?></strong>
</span>
</span>
</p>
</div>
</td>
</tr>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="bwf-email-text bwf-email-text-2cfd4a0"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; padding: 0px 0px 8px 0px; word-break: break-word;">
<div class="bwf-block-text-container"
style="text-align: center; font-size: 14px; font-family: arial,helvetica,sans-serif; line-height: 1.5; color: #ff6900;">
<p class="bwf-block-text-inner-container"
style="margin: 0; mso-line-height-alt: 150%; word-break: break-word; font-size: 14px; font-family: arial,helvetica,sans-serif; line-height: 1.5;">
<span
style="mso-line-height-alt: 150%; background-color: rgba(0, 0, 0, 0); color: <?php echo esc_html( $text_color ); ?>;"
class="has-inline-color">
<span
style="mso-line-height-alt: 150%; font-size: 16px;"
class="has-font-size"><?php echo wp_strip_all_tags( $subtitle );//phpcs:ignore WordPress.Security.EscapeOutput ?>
</span>
</span>
</p>
</div>
</td>
</tr>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="bwfbe-block-btn bwfbe-block-btn-b434bf2" align="center"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; padding: 18px 16px 0 16px; mso-padding-alt: 18px 16px 0px 16px;">
<!--[if mso | IE]><span style="margin-left:16px"><![endif]-->
<table cellpadding="0" cellspacing="0" border="0"
style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; width: auto; border-collapse: separate;"
role="presentation" class="bwfbe-block-btn-container">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="bwfbe-btn-text-wrap"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; font-size: 16px; cursor: auto; border-style: none; background-color: <?php echo esc_html( $btn_bg_color ); ?>; font-size: 16px; border-radius: 8px; mso-padding-alt: 10px 20px; mso-padding-alt: 10px 24px 10px 24px; text-align: center; line-height: 1.5;"
bgcolor="<?php echo esc_html( $btn_bg_color ); ?>" align="center">
<a
href="<?php echo esc_url( $button_url ); ?>" target="_blank"
class="bwfbe-block-btn-content"
style="line-height: 1.5; text-decoration: none; padding: 10px 20px; padding: 10px 24px 10px 24px; mso-padding-alt: 0; background-color: <?php echo esc_html( $btn_bg_color ); ?>; font-size: 16px; font-family: arial,helvetica,sans-serif; display: inline-block; text-decoration: none; text-transform: none; color: <?php echo esc_html( $btn_text_color ) ?>; border-radius: 8px;">
<strong><?php echo wp_strip_all_tags( $button_text ); //phpcs:ignore WordPress.Security.EscapeOutput ?></strong>
</a>
</td>
</tr>
</tbody>
</table>
<!--[if mso | IE]></span><![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td><![endif]--><!--[if mso | IE]></tr></tbody></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,131 @@
<?php
defined( 'ABSPATH' ) || exit;
?>
<table cellpadding="0" cellspacing="0" border="0" bgcolor="" align="center" role="presentation"
class="bwfbe-block-section-container bwfbe-block-section bwfbe-block-051356b"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; width: 640px;"
width="640">
<tbody>
<tr style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; background-color: #ffffff;"
bgcolor="#ffffff">
<!--[if mso | IE]><table cellpadding="0" cellspacing="0" border="0" align="center" style="width:100%" role="presentation" width="640"><tr><td style="line-height:0;font-size:0;-mso-line-height-rule:exactly"><![endif]-->
<div class="bwfbe-block-section-outer-container"
style="margin: 0 auto; width: 640px; background-color: #ffffff;">
<table cellpadding="0" cellspacing="0" border="0" align="center"
style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: normal; background-color: #ffffff; width: 100%; border-collapse: separate;"
role="presentation" width="100%" class="bwfbe-block-section-inner-container" bgcolor="#ffffff">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td
style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; font-size: 0px; border-collapse: separate; padding: 16px; mso-padding-alt: 16px;">
<!--[if mso | IE]><table cellpadding="0" cellspacing="0" border="0" style="width:100%;border-collapse:separate" role="presentation"><tbody><tr><![endif]--><!--[if mso | IE]><td style="width: 608px;vertical-align: top;" valign="top"><![endif]-->
<div class="bwf-email-inner-column-wrapper bwf-email-inner-column-wrapper-cdabb86"
style="font-size: 0px; border-collapse: separate; display: table-cell; vertical-align: top; mso-border-alt: none; width: 608px;">
<table cellpadding="0" cellspacing="0" border="0"
style="border-spacing: 0px; border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;"
role="presentation"
class="bwf-email-inner-column bwf-email-inner-column-cdabb86" width="100%">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="bwfbe-block-html bwfbe-block-html-6c3cf67"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; padding: 0px 0px 0px 0px; font-size: 16px; font-family: arial,helvetica,sans-serif;">
<table cellpadding="0" cellspacing="0" border="0" align="left"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; width: 100%;"
role="presentation" width="100%">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: 1.5;">
<table cellpadding="0" cellspacing="0"
border="0" class="metrics-table"
style="border-spacing: 0px; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; max-width: 600px; border-collapse: collapse; font-family: arial, helvetica, sans-serif;"
width="100%">
<tbody>
<?php
$total_tiles = count( $tile_data );
foreach ( $tile_data as $key => $tile ) {
?>
<tr style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<?php
foreach ( $tile as $inner_key => $col ) {
$padding = ( 0 === $inner_key % 2 ) ? 'padding-right: 10px' : 'padding-left: 0';
?>
<td class="metric-cell" id="total-contacts" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: 1.5; width: 50%; vertical-align: top; <?php echo esc_html( $padding ) ?>"
width="50%" valign="top">
<table cellpadding="0" cellspacing="0" border="0"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; width: 100%;"
width="100%">
<tbody>
<tr style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: 1.5; font-family: arial, helvetica, sans-serif; font-size: 16px; color: #000000; padding-bottom: 5px;" class="metric-label">
<b><?php echo $col['text']; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></b>
</td>
</tr>
<tr style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: 1.5; font-family: arial, helvetica, sans-serif; font-size: 48px; font-weight: bold; color: #000000; padding-bottom: 5px;">
<?php echo $col['count']; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php if ( ! empty( $col['count_suffix'] ) ) {
?>
<span style="font-size: 18px; font-weight: normal;">
<?php echo $col['count_suffix']; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</span>
<?php
} ?>
</td>
</tr>
<tr style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="metric-delta" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: 1.5;">
<?php $color = $col['percentage_change_positive'] ? '#089D61' : '#FF0000'; ?>
<span style="font-family: arial, helvetica, sans-serif;color: <?php echo esc_html( $color ); ?>; font-size: 16px;">
<?php echo $col['percentage_change']; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</span>
<span style="font-family: arial, helvetica, sans-serif;color: #666666; font-size: 14px;">
<?php echo $col['previous_text']; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</span>
</td>
</tr>
</tbody>
</table>
</td>
<?php
}
?>
</tr>
<?php if ( ( $key+1 ) !== $total_tiles ) {
?>
<tr style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="spacer-row" colspan="2"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: 1.5; height: 32px;"
height="32"></td>
</tr>
<?php
} ?>
<?php
} ?>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td><![endif]--><!--[if mso | IE]></tr></tbody></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div><!--[if mso | IE]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,134 @@
<?php
defined( 'ABSPATH' ) || exit;
?>
<table cellpadding="0" cellspacing="0" border="0" bgcolor="" align="center" role="presentation"
class="bwfbe-block-section-container bwfbe-block-section bwfbe-block-253eaea"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; width: 640px;"
width="640">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; background-color: #ffffff;"
bgcolor="#ffffff">
<!--[if mso | IE]><table cellpadding="0" cellspacing="0" border="0" align="center" style="width:100%" role="presentation" width="640"><tr><td style="line-height:0;font-size:0;-mso-line-height-rule:exactly"><![endif]-->
<div class="bwfbe-block-section-outer-container"
style="margin: 0 auto; width: 640px; background-color: #ffffff;">
<table cellpadding="0" cellspacing="0" border="0" align="center"
style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: normal; background-color: #ffffff; width: 100%; border-collapse: separate;"
role="presentation" width="100%" class="bwfbe-block-section-inner-container"
bgcolor="#ffffff">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td
style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; font-size: 0px; border-collapse: separate; padding: 0 16px 16px; mso-padding-alt: 0 16px 16px;">
<!--[if mso | IE]><table cellpadding="0" cellspacing="0" border="0" style="width:100%;border-collapse:separate" role="presentation"><tbody><tr><![endif]--><!--[if mso | IE]><td style="width: 608px;vertical-align: top;" valign="top"><![endif]-->
<div class="bwf-email-inner-column-wrapper bwf-email-inner-column-wrapper-b88f6c4"
style="font-size: 0px; border-collapse: separate; display: table-cell; vertical-align: top; mso-border-alt: none; width: 608px;">
<table cellpadding="0" cellspacing="0" border="0"
style="border-spacing: 0px; border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;"
role="presentation"
class="bwf-email-inner-column bwf-email-inner-column-b88f6c4"
width="100%">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="bwfbe-block-html bwfbe-block-html-e48f206"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; padding: 16px 0px 8px 0px; font-size: 16px; font-family: arial,helvetica,sans-serif;">
<table cellpadding="0" cellspacing="0"
border="0" align="left"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; width: 100%;"
role="presentation" width="100%">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: 1.5;">
<table cellpadding="0"
cellspacing="0" border="0"
style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; width: 100%; max-width: 600px; border-collapse: collapse;"
width="100%">
<tbody>
<?php foreach( $todolist as $list ){
$border_bottom = ( isset( $list['last'] ) && $list['last'] === true ) ? 'none' : '1px solid #e0e0e0';
?>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: 1.5; border-bottom: <?php echo intval($border_bottom) ?>; padding: 10px 0;">
<table
cellpadding="0"
cellspacing="0"
border="0"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; width: 100%;"
width="100%">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: 1.5; font-family: Arial, sans-serif; font-size: 14px; color: #333333;">
<?php echo $list['title']; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</td>
<?php if( $list['status'] === 'pro' ){
?>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: 1.5; width: 130px; text-align: right;"
width="130"
align="right"><a href="<?php echo esc_url( $upgrade_link ); ?>"
style="color: #0073aa; text-decoration: underline; font-family: Arial, sans-serif; font-size: 14px;">
<b>
<?php echo esc_html__( 'Upgrade to Pro', 'wp-marketing-automations' );?>
</b>
</a>
</td>
<?php
} elseif( $list['status'] === 'active' ){
?>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: 1.5; width: 30px; text-align: right;"
width="30"
align="right">
<span
style="color: #4CAF50; font-size: 18px;">✅</span>
</td>
<?php
} else {
?>
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: 1.5; width: 50px; text-align: right;"
width="50"
align="right">
<a href="<?php echo esc_url($list['link']); ?>"
style="color: #0073aa; text-decoration: underline; font-family: Arial, sans-serif; font-size: 14px;">
<b>
<?php esc_html_e( 'Setup', 'wp-marketing-automations' );?>
</b>
</a>
</td>
<?php
}?>
</tr>
</tbody>
</table>
</td>
</tr>
<?php
} ?>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td><![endif]--><!--[if mso | IE]></tr></tbody></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div><!--[if mso | IE]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,147 @@
<?php
defined( 'ABSPATH' ) || exit;
?>
<table cellpadding="0" cellspacing="0" border="0" bgcolor="" align="center" role="presentation"
class="bwfbe-block-section-container bwfbe-block-section bwfbe-block-dee5d03"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; width: 640px;"
width="640">
<tbody>
<tr style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; background-color: #ffffff;"
bgcolor="#ffffff">
<!--[if mso | IE]><table cellpadding="0" cellspacing="0" border="0" align="center" style="width:100%" role="presentation" width="640"><tr><td style="line-height:0;font-size:0;-mso-line-height-rule:exactly"><![endif]-->
<div class="bwfbe-block-section-outer-container"
style="margin: 0 auto; width: 640px; background-color: #ffffff;">
<table cellpadding="0" cellspacing="0" border="0" align="center"
style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: normal; background-color: #ffffff; width: 100%; border-collapse: separate;"
role="presentation" width="100%" class="bwfbe-block-section-inner-container" bgcolor="#ffffff">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td
style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; font-size: 0px; border-collapse: separate; padding: 16px; mso-padding-alt: 16px;">
<!--[if mso | IE]><table cellpadding="0" cellspacing="0" border="0" style="width:100%;border-collapse:separate" role="presentation"><tbody><tr><![endif]--><!--[if mso | IE]><td style="width: 470px;vertical-align: middle;border-radius: 8px 0px 0px 8px;background-color:<?php echo esc_html( $background_color ); ?> ;" valign="middle"><![endif]-->
<div class="bwf-email-inner-column-wrapper bwf-email-inner-column-wrapper-083019f"
style="font-size: 0px; border-collapse: separate; display: table-cell; vertical-align: middle; border-radius: 8px 0px 0px 8px; background-color: <?php echo esc_html( $background_color ); ?>; mso-border-alt: none; width: 470px;">
<table cellpadding="0" cellspacing="0" border="0"
style="border-spacing: 0px; border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: <?php echo esc_html( $background_color ); ?>; border-radius: 8px 0px 0px 8px; width: 100%;"
role="presentation"
class="bwf-email-inner-column bwf-email-inner-column-083019f" width="100%"
bgcolor="<?php echo esc_html( $background_color ); ?>">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="bwf-email-inner-column-container"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; padding: 12px 12px 12px 16px;">
<table cellpadding="0" cellspacing="0" border="0"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; width: 100%;"
role="presentation" width="100%">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="bwf-email-text bwf-email-text-8f797fa"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; padding: 0px 0px 8px 0px; word-break: break-word;">
<div class="bwf-block-text-container"
style="font-size: 16px; font-family: arial,helvetica,sans-serif; line-height: 1.3; color: #353030;">
<p class="bwf-block-text-inner-container"
style="margin: 0; mso-line-height-alt: 130%; word-break: break-word; font-size: 16px; font-family: arial,helvetica,sans-serif; line-height: 1.3;">
<span
style="mso-line-height-alt: 130%; background-color: rgba(0, 0, 0, 0); color: #000000;"
class="has-inline-color"><span
style="mso-line-height-alt: 130%; font-size: 14px;"
class="has-font-size">
<?php echo $content; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</span></span>
</p>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div><!--[if mso | IE]></td><![endif]-->
<!--[if mso | IE]><td style="width: 0px;vertical-align:top;" valign="top><![endif]-->
<div style="border-collapse: separate; font-size: 0; vertical-align: top; display: table-cell; width: 0px;"
class="bwfbe-section-gap-dee5d03">
<table cellpadding="0" cellspacing="0" border="0" role="presentation" width="0"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td><![endif]--><!--[if mso | IE]><td style="width: 169.01408450704227px;vertical-align: middle;border-radius: 0px 8px 8px 0px; background-color:<?php echo esc_html($background_color); ?> ;" valign="middle"><![endif]-->
<div class="bwf-email-inner-column-wrapper bwf-email-inner-column-wrapper-4f8575e"
style="font-size: 0px; border-collapse: separate; display: table-cell; vertical-align: middle; border-radius: 0px 8px 8px 0px; background-color: <?php echo esc_html( $background_color ); ?>; mso-border-alt: none; width: 169.01408450704227px;">
<table cellpadding="0" cellspacing="0" border="0"
style="border-spacing: 0px; border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: <?php echo esc_html( $background_color ); ?>; border-radius: 0px 8px 8px 0px; width: 100%;"
role="presentation"
class="bwf-email-inner-column bwf-email-inner-column-4f8575e" width="100%"
bgcolor="<?php echo esc_html($background_color); ?>">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="bwf-email-inner-column-container"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; padding: 0px 16px 0px 0px;">
<table cellpadding="0" cellspacing="0" border="0"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; width: 100%;"
role="presentation" width="100%">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="bwfbe-block-btn bwfbe-block-btn-829b566"
align="right"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; padding: 0px 0px 0px 6px; mso-padding-alt: 0px 0px 0px 6px;">
<!--[if mso | IE]><span style="margin-left:6px"><![endif]-->
<table cellpadding="0" cellspacing="0"
border="0"
style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; width: auto; border-collapse: separate;"
role="presentation"
class="bwfbe-block-btn-container">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="bwfbe-btn-text-wrap"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; font-size: 16px; cursor: auto; border-style: none; background-color: <?php echo esc_html( $button_color ); ?>; font-size: 13px; border-radius: 8px 8px 8px 8px; mso-padding-alt: 10px 20px; mso-padding-alt: 8px 16px 8px 16px; text-align: center; line-height: 1.5;"
bgcolor="<?php echo esc_html( $button_color ); ?>"
align="center">
<a href="<?php echo esc_url( $link ); ?>"
target="_blank"
class="bwfbe-block-btn-content"
style="line-height: 1.5; text-decoration: none; padding: 10px 20px; padding: 8px 16px 8px 16px; mso-padding-alt: 0; background-color: <?php echo esc_html( $button_color ); ?>; font-size: 13px; font-family: arial,helvetica,sans-serif; display: inline-block; text-decoration: none; text-transform: none; color: <?php echo esc_html( $button_text_color ); ?>; border-radius: 8px 8px 8px 8px;">
<strong><?php echo $link_text; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
</a>
</td>
</tr>
</tbody>
</table>
<!--[if mso | IE]></span><![endif]-->
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td><![endif]--><!--[if mso | IE]></tr></tbody></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div><!--[if mso | IE]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,77 @@
<?php
defined( 'ABSPATH' ) || exit;
?>
<table cellpadding="0" cellspacing="0" border="0" bgcolor="" align="center" role="presentation"
class="bwfbe-block-section-container bwfbe-block-section bwfbe-block-dee5d03"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; width: 640px;"
width="640">
<tbody>
<tr style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; background-color: #ffffff;"
bgcolor="#ffffff">
<!--[if mso | IE]><table cellpadding="0" cellspacing="0" border="0" align="center" style="width:100%" role="presentation" width="640"><tr><td style="line-height:0;font-size:0;-mso-line-height-rule:exactly"><![endif]-->
<div class="bwfbe-block-section-outer-container"
style="margin: 0 auto; width: 640px; background-color: #ffffff;">
<table cellpadding="0" cellspacing="0" border="0" align="center"
style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: normal; background-color: #ffffff; width: 100%; border-collapse: separate; padding-top: 18px;"
role="presentation" width="100%" class="bwfbe-block-section-inner-container" bgcolor="#ffffff">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td
style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; font-size: 0px; border-collapse: separate; padding: 16px; mso-padding-alt: 16px;">
<!--[if mso | IE]><table cellpadding="0" cellspacing="0" border="0" style="width:100%;border-collapse:separate" role="presentation"><tbody><tr><![endif]--><!--[if mso | IE]><td style="vertical-align: middle;border-radius: 8px;background-color:<?php echo esc_html( $background_color ); ?> ;" valign="middle"><![endif]-->
<div class="bwf-email-inner-column-wrapper bwf-email-inner-column-wrapper-083019f"
style="font-size: 0px; border-collapse: separate; display: table-cell; vertical-align: middle; border-radius: 8px !important; background-color: <?php echo esc_html( $background_color ); ?>; mso-border-alt: none;">
<table cellpadding="0" cellspacing="0" border="0"
style="border-spacing: 0px; border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: <?php echo esc_html( $background_color ); ?>; border-radius: 8px; width: 100%;"
role="presentation"
class="bwf-email-inner-column bwf-email-inner-column-083019f" width="100%"
bgcolor="<?php echo esc_html( $background_color ); ?>">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="bwf-email-inner-column-container"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; padding: 12px 12px 12px 16px;">
<table cellpadding="0" cellspacing="0" border="0"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; width: 100%;"
role="presentation" width="100%">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="bwf-email-text bwf-email-text-8f797fa"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; padding: 0; word-break: break-word;">
<div class="bwf-block-text-container"
style="font-size: 16px; font-family: arial,helvetica,sans-serif; line-height: 1.3; color: #353030;">
<p class="bwf-block-text-inner-container"
style="margin: 0; mso-line-height-alt: 130%; word-break: break-word; font-size: 16px; font-family: arial,helvetica,sans-serif; line-height: 1.3;">
<span
style="mso-line-height-alt: 130%; background-color: rgba(0, 0, 0, 0); color: #000000;"
class="has-inline-color"><span
style="mso-line-height-alt: 130%; font-size: 14px;"
class="has-font-size">
<?php echo $content; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</span></span>
</p>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td><![endif]-->
<!--[if mso | IE]></tr></tbody></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div><!--[if mso | IE]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,55 @@
<?php
defined( 'ABSPATH' ) || exit;
?>
<table cellpadding="0" cellspacing="0" border="0" bgcolor="" align="center" role="presentation"
class="bwfbe-block-section-container bwfbe-block-section bwfbe-block-ff210eb"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; width: 640px;"
width="640">
<tbody>
<tr style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; background-color: #ffffff;"
bgcolor="#ffffff">
<!--[if mso | IE]><table cellpadding="0" cellspacing="0" border="0" align="center" style="width:100%" role="presentation" width="640"><tr><td style="line-height:0;font-size:0;-mso-line-height-rule:exactly"><![endif]-->
<div class="bwfbe-block-section-outer-container"
style="margin: 0 auto; width: 640px; background-color: #ffffff;">
<table cellpadding="0" cellspacing="0" border="0" align="center"
style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: normal; background-color: #ffffff; width: 100%; border-collapse: separate;"
role="presentation" width="100%" class="bwfbe-block-section-inner-container" bgcolor="#ffffff">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td
style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; font-size: 0px; border-collapse: separate; padding: 0; mso-padding-alt: 0;">
<!--[if mso | IE]><table cellpadding="0" cellspacing="0" border="0" style="width:100%;border-collapse:separate" role="presentation"><tbody><tr><![endif]--><!--[if mso | IE]><td style="width: 640px;vertical-align: top;" valign="top"><![endif]-->
<div class="bwf-email-inner-column-wrapper bwf-email-inner-column-wrapper-4bc1676"
style="font-size: 0px; border-collapse: separate; display: table-cell; vertical-align: top; mso-border-alt: none; width: 640px;">
<table cellpadding="0" cellspacing="0" border="0"
style="border-spacing: 0px; border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;"
role="presentation"
class="bwf-email-inner-column bwf-email-inner-column-4bc1676" width="100%">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="bwf-email-space-divider bwf-email-space-divider-bf3b375"
align="center"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; padding: 12px 0px 12px 0px; mso-padding-alt: 12px 0px 12px 0px; font-size: 0px; word-break: break-word; word-break: break-word;">
<p class="bwf-email-space-divider-container"
style="margin: 0; width: 100%; margin-top: auto; margin-bottom: auto; max-width: 90%; border-top-width: 1px; border-top-style: solid; border-top-color: #e2e2e2; margin-left: auto; margin-right: auto;">
</p>
<!--[if mso | IE]><table cellpadding="0" cellspacing="0" border="0" style="width:90%" role="presentation" width="90%"><tr><td style="height:0;line-height:0;margin:auto;border-top-width:1px;;border-top-style:solid;border-top-color:#e2e2e2"></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td><![endif]--><!--[if mso | IE]></tr></tbody></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div><!--[if mso | IE]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,109 @@
<?php
defined( 'ABSPATH' ) || exit;
$business_details = '<u style="text-decoration: underline;"><a rel="noreferrer noopener" style="text-decoration-line: none; background-color: rgba(0, 0, 0, 0); color: #236fa1;" href="' . esc_url( get_home_url() ) . '" target="_blank">' . wp_strip_all_tags( $business_name ) . '</a></u>'; //phpcs:ignore WordPress.Security.EscapeOutput
$settings_text = '<u style="text-decoration: underline;"><a rel="noreferrer noopener" style="text-decoration-line: none; background-color: rgba(0, 0, 0, 0); color: #236fa1;" href="' . esc_url( admin_url( 'admin.php?page=autonami&path=/settings/notifications' ) ) . '" target="_blank">' . esc_html( __( 'Click here', 'wp-marketing-automations' ) ) . '</a></u>';
?>
<table cellpadding="0" cellspacing="0" border="0" bgcolor="" align="center" role="presentation"
class="bwfbe-block-section-container bwfbe-block-section bwfbe-block-834352e"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; width: 640px;"
width="640">
<tbody>
<tr style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; background-color: #ffffff;"
bgcolor="#ffffff">
<!--[if mso | IE]>
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:100%" role="presentation" width="640">
<tr>
<td style="line-height:0;font-size:0;-mso-line-height-rule:exactly"><![endif]-->
<div class="bwfbe-block-section-outer-container"
style="margin: 0 auto; width: 640px; background-color: #ffffff;">
<table cellpadding="0" cellspacing="0" border="0" align="center"
style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; line-height: normal; background-color: #ffffff; width: 100%; border-collapse: separate;"
role="presentation" width="100%" class="bwfbe-block-section-inner-container" bgcolor="#ffffff">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td
style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; font-size: 0px; border-collapse: separate; padding: 12px 16px 16px; mso-padding-alt: 12px 16px 16px;">
<!--[if mso | IE]>
<table cellpadding="0" cellspacing="0" border="0" style="width:100%;border-collapse:separate" role="presentation">
<tbody>
<tr><![endif]--><!--[if mso | IE]>
<td style="width: 608px;vertical-align: top;" valign="top"><![endif]-->
<div class="bwf-email-inner-column-wrapper bwf-email-inner-column-wrapper-0cf05ad"
style="font-size: 0px; border-collapse: separate; display: table-cell; vertical-align: top; mso-border-alt: none; width: 608px;">
<table cellpadding="0" cellspacing="0" border="0"
style="border-spacing: 0px; border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;"
role="presentation"
class="bwf-email-inner-column bwf-email-inner-column-0cf05ad" width="100%">
<tbody>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="bwf-email-space-divider bwf-email-space-divider-de9d012"
align="center"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; padding: 16px 0px 16px 0px; mso-padding-alt: 16px 0px 16px 0px; font-size: 0px; word-break: break-word; word-break: break-word;">
<p class="bwf-email-space-divider-container"
style="margin: 0; width: 100%; margin-top: auto; margin-bottom: auto; max-width: 100%; border-top-width: 1px; border-top-style: solid; border-top-color: #BBBBBB; margin-left: auto; margin-right: auto;">
</p>
<!--[if mso | IE]>
<table cellpadding="0" cellspacing="0" border="0" style="width:100%" role="presentation" width="100%">
<tr>
<td style="height:0;line-height:0;margin:auto;border-top-width:1px;;border-top-style:solid;border-top-color:#BBBBBB"></td>
</tr>
</table><![endif]-->
</td>
</tr>
<tr
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px;">
<td class="bwf-email-text bwf-email-text-90e004c"
style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0px; padding: 0px 0px 8px 0px; word-break: break-word;">
<div class="bwf-block-text-container"
style="text-align: center; font-size: 14px; font-family: arial,helvetica,sans-serif; line-height: 1.3; color: #ff6900;">
<p class="bwf-block-text-inner-container"
style="margin: 0; mso-line-height-alt: 130%; word-break: break-word; font-size: 14px; font-family: arial,helvetica,sans-serif; line-height: 1.3;">
<span
style="mso-line-height-alt: 130%; background-color: rgba(0, 0, 0, 0); color: #000000;"
class="has-inline-color">
<span
style="mso-line-height-alt: 130%; font-size: 12px;"
class="has-font-size">
<?php echo sprintf( __( 'This performance report email was sent from your site %1$s for period %2$s.', 'wp-marketing-automations' ), $business_details, $date ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.WP.I18n.MissingTranslatorsComment ?>
</span>
</span>
<br/>
<span
style="mso-line-height-alt: 130%; background-color: rgba(0, 0, 0, 0); color: #000000;"
class="has-inline-color">
<span
style="mso-line-height-alt: 130%; font-size: 12px;"
class="has-font-size"><?php echo sprintf( __( '%s to manage the frequency and recipients.', 'wp-marketing-automations' ), $settings_text ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.WP.I18n.MissingTranslatorsComment ?>
</span>
</span>
</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td><![endif]--><!--[if mso | IE]></tr></tbody></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</div>
<!--[if mso | IE]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,40 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
?>
<table cellpadding="0" cellspacing="0" border="0" bgcolor="" align="center" role="presentation" class="bwfbe-block-section-container bwfbe-block-section bwfbe-block-dcb37e6" style="border-collapse: collapse; width: 640px;" width="640">
<tbody>
<tr>
<td style="background-color: #ffffff;" bgcolor="#ffffff">
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width: 100%; border-collapse: collapse; background-color: #ffffff;" role="presentation" class="bwfbe-block-section-inner-container" bgcolor="#ffffff" width="100%">
<tbody>
<tr>
<td style="padding: 24px 36px;">
<table cellpadding="0" cellspacing="0" border="0" style="width: 100%; border-collapse: collapse;" role="presentation" class="bwf-email-inner-column bwf-email-inner-column-87a94f3" width="100%">
<tbody>
<tr>
<td class="bwf-email-text bwf-email-text-9c3539c" style="padding-bottom: 8px; mso-padding-alt: 0 0 8px 0;text-align: center;">
<p class="bwf-block-text-inner-container" style="margin: 0; font-size: 36px; font-family: Arial, Helvetica, sans-serif; font-weight: bold; color: #000;">
<?php echo wp_strip_all_tags( $title ); //phpcs:ignore WordPress.Security.EscapeOutput ?>
</p>
</td>
</tr>
<tr>
<td class="bwf-email-text bwf-email-text-8c73b4e" style="text-align: center;">
<p class="bwf-block-text-inner-container" style="margin: 0; font-size: 16px; font-family: Arial, Helvetica, sans-serif; color: #000;">
<?php echo wp_strip_all_tags( $subtitle ); //phpcs:ignore WordPress.Security.EscapeOutput ?>
</p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,2 @@
<?php
// Silence is golden.

View File

@@ -0,0 +1,30 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/** checking if woocommerce exists otherwise return */
if ( ! function_exists( 'bwfan_is_woocommerce_active' ) || ! bwfan_is_woocommerce_active() ) {
return;
}
$product_ids = [];
if ( false !== $cart ) {
foreach ( $cart as $item ) {
$product = isset( $item['data'] ) ? $item['data'] : '';
if ( empty( $product ) || ! $product instanceof WC_Product ) {
continue; // don't include items if there is no product
}
$product_ids[] = $product->get_id();
}
} else {
foreach ( $products as $product ) {
if ( ! $product instanceof WC_Product ) {
continue;
}
$product_ids[] = $product->get_id();
}
}
$explode_operator = apply_filters( 'bwfan_product_name_separator', ', ' );
echo implode( $explode_operator, $product_ids ); //phpcs:ignore WordPress.Security.EscapeOutput

View File

@@ -0,0 +1,65 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/** checking if woocommerce exists otherwise return */
if ( ! function_exists( 'bwfan_is_woocommerce_active' ) || ! bwfan_is_woocommerce_active() ) {
return;
}
$exclude_variable_attribute = apply_filters( 'bwfan_exclude_wc_variable_attribute', false );
$tax_display = get_option( 'woocommerce_tax_display_cart' );
$suffix = BWFAN_Common::get_wc_tax_label_if_displayed();
$product_names_with_price = [];
$currency = is_array( $data ) && isset( $data['currency'] ) ? $data['currency'] : '';
if ( false !== $cart ) {
foreach ( $cart as $item ) {
$product = isset( $item['data'] ) ? $item['data'] : '';
if ( empty( $product ) || ! $product instanceof WC_Product ) {
continue;
}
$price = $line_total = ( $tax_display === 'excl' ) ? BWFAN_Common::get_line_subtotal( $item ) : BWFAN_Common::get_line_subtotal( $item ) + BWFAN_Common::get_line_subtotal_tax( $item );
$line_total = is_null( $price ) ? BWFAN_Common::get_prices_with_tax( $product ) : $price;
$name = $product->get_name();
if ( $product instanceof WC_Product_Variation && false === $exclude_variable_attribute ) {
$name .= ' - ' . $product->get_attribute_summary();
}
$formatted_price = BWFAN_Common::price( $line_total, $currency );
$price_display = $formatted_price;
if ( $suffix && wc_tax_enabled() ) {
$price_display .= ' ' . $suffix;
}
$product_names_with_price[] = $name . " ( " . $price_display . " )";
}
} else {
foreach ( $products as $product ) {
if ( ! $product instanceof WC_Product ) {
continue;
}
$price = isset( $products_price[ $product->get_id() ] ) ? $products_price[ $product->get_id() ] : null;
$line_total = is_null( $price ) ? BWFAN_Common::get_prices_with_tax( $product ) : $price;
$name = $product->get_name();
if ( $product instanceof WC_Product_Variation && false === $exclude_variable_attribute ) {
$name .= ' - ' . $product->get_attribute_summary();
}
/** Format the price properly */
$formatted_price = BWFAN_Common::price( $line_total, $currency );
/** Add suffix if enabled*/
$price_display = $formatted_price;
if ( $suffix && wc_tax_enabled() ) {
$price_display .= ' ' . $suffix;
}
$product_names_with_price[] = $name . " ( " . $price_display . " )";
}
}
$explode_operator = apply_filters( 'bwfan_product_name_separator', ', ' );
echo implode( $explode_operator, $product_names_with_price ); //phpcs:ignore WordPress.Security.EscapeOutput

View File

@@ -0,0 +1,47 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/** checking if woocommerce exists other wise return */
if ( ! function_exists( 'bwfan_is_woocommerce_active' ) || ! bwfan_is_woocommerce_active() ) {
return;
}
$exclude_variable_attribute = apply_filters( 'bwfan_exclude_wc_variable_attribute', false );
$product_names_with_sku = [];
if ( false !== $cart ) {
foreach ( $cart as $item ) {
$product = isset( $item['data'] ) ? $item['data'] : '';
if ( empty( $product ) || ! $product instanceof WC_Product ) {
continue; // don't show items if there is no product
}
$product_sku = isset( $products_sku[ $product->get_id() ] ) && ! empty( $products_sku[ $product->get_id() ] ) ? " ( " . $products_sku[ $product->get_id() ] . " )" : '';
$name = $product->get_name();
if ( $product instanceof WC_Product_Variation && false === $exclude_variable_attribute ) {
$name .= ' - ' . $product->get_attribute_summary();
}
$product_names_with_sku[] = $name . $product_sku;
}
} else {
foreach ( $products as $product ) {
$product_sku = '';
if ( ! $product instanceof WC_Product ) {
continue;
}
$product_sku = isset( $products_sku[ $product->get_id() ] ) && ! empty( $products_sku[ $product->get_id() ] ) ? " ( " . $products_sku[ $product->get_id() ] . " )" : '';
$name = $product->get_name();
if ( $product instanceof WC_Product_Variation && false === $exclude_variable_attribute ) {
$name .= ' - ' . $product->get_attribute_summary();
}
$product_names_with_sku[] = $name . $product_sku;
}
}
$explode_operator = apply_filters( 'bwfan_product_name_separator', ', ' );
echo implode( $explode_operator, $product_names_with_sku ); //phpcs:ignore WordPress.Security.EscapeOutput

View File

@@ -0,0 +1,47 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/** checking if woocommerce exists other wise return */
if ( ! function_exists( 'bwfan_is_woocommerce_active' ) || ! bwfan_is_woocommerce_active() ) {
return;
}
$exclude_variable_attribute = apply_filters( 'bwfan_exclude_wc_variable_attribute', false );
$product_names_with_quantity = [];
if ( false !== $cart ) {
foreach ( $cart as $item ) {
$product = isset( $item['data'] ) ? $item['data'] : '';
if ( empty( $product ) || ! $product instanceof WC_Product ) {
continue; // don't show items if there is no product
}
$product_quantity = isset( $products_quantity[ $product->get_id() ] ) ? ' x ' . $products_quantity[ $product->get_id() ] : '';
$name = $product->get_name();
if ( $product instanceof WC_Product_Variation && false === $exclude_variable_attribute ) {
$name .= ' - ' . $product->get_attribute_summary();
}
$product_names_with_quantity[] = $name . $product_quantity;
}
} else {
foreach ( $products as $product ) {
$product_quantity = '';
if ( ! $product instanceof WC_Product ) {
continue;
}
$product_quantity = isset( $products_quantity[ $product->get_id() ] ) ? ' x ' . $products_quantity[ $product->get_id() ] : '';
$name = $product->get_name();
if ( $product instanceof WC_Product_Variation && false === $exclude_variable_attribute ) {
$name .= ' - ' . $product->get_attribute_summary();
}
$product_names_with_quantity[] = $name . $product_quantity;
}
}
$explode_operator = apply_filters( 'bwfan_product_name_separator', ', ' );
echo implode( $explode_operator, $product_names_with_quantity ); //phpcs:ignore WordPress.Security.EscapeOutput

View File

@@ -0,0 +1,35 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/** checking if woocommerce exists other wise return */
if ( ! function_exists( 'bwfan_is_woocommerce_active' ) || ! bwfan_is_woocommerce_active() ) {
return;
}
$products_with_sku = [];
if ( false !== $cart ) {
foreach ( $cart as $item ) {
$product = isset( $item['data'] ) ? $item['data'] : '';
if ( empty( $product ) || ! $product instanceof WC_Product ) {
continue; // don't show items if there is no product
}
$product_sku = isset( $products_sku[ $product->get_id() ] ) && ! empty( $products_sku[ $product->get_id() ] ) ? $products_sku[ $product->get_id() ] : '';
$products_with_sku[] = $product_sku;
}
} else {
foreach ( $products as $product ) {
$product_sku = '';
if ( ! $product instanceof WC_Product ) {
continue;
}
$product_sku = isset( $products_sku[ $product->get_id() ] ) && ! empty( $products_sku[ $product->get_id() ] ) ? $products_sku[ $product->get_id() ] : '';
$products_with_sku[] = $product_sku;
}
}
$explode_operator = apply_filters( 'bwfan_product_name_separator', ', ' );
echo implode( $explode_operator, $products_with_sku ); //phpcs:ignore WordPress.Security.EscapeOutput

View File

@@ -0,0 +1,40 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/** checking if woocommerce exists other wise return */
if ( ! function_exists( 'bwfan_is_woocommerce_active' ) || ! bwfan_is_woocommerce_active() ) {
return;
}
$exclude_variable_attribute = apply_filters( 'bwfan_exclude_wc_variable_attribute', false );
$product_names = [];
if ( false !== $cart ) {
foreach ( $cart as $item ) {
$product = isset( $item['data'] ) ? $item['data'] : '';
if ( empty( $product ) || ! $product instanceof WC_Product ) {
continue; // don't show items if there is no product
}
$name = $product->get_name();
if ( $product instanceof WC_Product_Variation && false === $exclude_variable_attribute ) {
$name .= ' - ' . $product->get_attribute_summary();
}
$product_names[] = wp_strip_all_tags( $name );
}
} else {
foreach ( $products as $product ) {
if ( ! $product instanceof WC_Product ) {
continue;
}
$name = $product->get_name();
if ( $product instanceof WC_Product_Variation && false === $exclude_variable_attribute ) {
$name .= ' - ' . $product->get_attribute_summary();
}
$product_names[] = wp_strip_all_tags( $name );
}
}
$explode_operator = apply_filters( 'bwfan_product_name_separator', ', ' );
echo implode( $explode_operator, $product_names ); //phpcs:ignore WordPress.Security.EscapeOutput

View File

@@ -0,0 +1,85 @@
<?php
/** checking if woocommerce exists other wise return */
if ( ! function_exists( 'bwfan_is_woocommerce_active' ) || ! bwfan_is_woocommerce_active() ) {
return;
}
if ( true === BWFAN_Merge_Tag_Loader::get_data( 'is_preview' ) ) {
$order = wc_get_orders( array(
'numberposts' => 1,
) );
if ( is_array( $order ) && count( $order ) > 0 ) {
$this->order = $order[0];
}
}
add_action( 'bwfan_output_email_style', function () { ?>
.bwfan-email-order-table table {
width: 100%;
border-collapse: collapse;
max-width:700px;
font-size:14px;
}
.bwfan-email-order-table #template_header {
width: 100% !important;
}
.bwfan-email-order-table table img {
max-width: 75px;
}
<?php } );
if ( ! isset( $this->order ) || ! $this->order instanceof WC_Order ) {
return;
}
$order_lang = BWFAN_Common::get_order_language( $this->order );
do_action( 'bwfan_email_setup_locale', $order_lang );
$show_downloads = $this->order->has_downloadable_item() && $this->order->is_download_permitted();
echo "<div class='bwfan-email-order-table'>";
?>
<!--[if mso]>
<table>
<tr>
<td width="700">
<![endif]-->
<?php
/** Remove wc template filter to disallow modify template path. */
if ( true === apply_filters( 'bwfan_remove_wc_template_filters', true ) ) {
remove_all_filters( 'woocommerce_locate_template' );
remove_all_filters( 'wc_get_template' );
}
if ( $show_downloads ) {
$downloads = $this->order->get_downloadable_items();
$columns = apply_filters( 'woocommerce_email_downloads_columns', array(
'download-product' => __( 'Product', 'woocommerce' ), // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch
'download-expires' => __( 'Expires', 'woocommerce' ), // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch
'download-file' => __( 'Download', 'woocommerce' ), // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch
) );
wc_get_template( 'emails/email-downloads.php', array(
'order' => $this->order,
'sent_to_admin' => false,
'plain_text' => false,
'email' => '',
'downloads' => $downloads,
'columns' => $columns,
) );
}
wc_get_template( 'emails/email-order-details.php', array(
'order' => $this->order,
'sent_to_admin' => false,
'plain_text' => false,
'email' => '',
) );
?>
<!--[if mso]>
</td></tr></table>
<![endif]-->
<?php
echo '</div>';

View File

@@ -0,0 +1,129 @@
<?php
$n = 1;
$currency = is_array( $data ) && isset( $data['currency'] ) ? $data['currency'] : '';
/** checking if woocommerce exists other wise return */
if ( ! function_exists( 'bwfan_is_woocommerce_active' ) || ! bwfan_is_woocommerce_active() ) {
return;
}
add_action( 'bwfan_output_email_style', function () { ?>
.bwfan-email-product-2-col .bwfan-product-grid {
width: 100%;
border-collapse: collapse;
max-width:700px;
}
.bwfan-email-product-2-col .bwfan-product-grid-item-2-col {
width: 46%;
display: inline-block;
text-align: center;
padding: 0 0 20px;
vertical-align: top;
word-wrap: break-word;
margin-right: 6%;
font-size: 14px;
}
#body_content .bwfan-email-product-2-col .bwfan-product-grid-item-2-col h4 {
text-align: center;
}
#body_content .bwfan-email-product-2-col .bwfan-product-grid-item-2-col p.price {
margin-bottom: 0;
}
<?php } );
if ( is_array( $products ) ) :
?>
<div class='bwfan-email-product-2-col bwfan-email-table-wrap'>
<table cellspacing="0" cellpadding="0" class="bwfan-product-grid">
<tbody>
<tr>
<td style="padding: 0;">
<div class="bwfan-product-grid-container">
<?php
$disable_product_link = BWFAN_Common::disable_product_link();
$disable_product_thumbnail = BWFAN_Common::disable_product_thumbnail();
if ( false !== $cart ) {
$cartItemLinkEnabled = apply_filters( 'bwfan_block_editor_enable_cart_item_link', true );
$suffix = BWFAN_Common::get_wc_tax_label_if_displayed();
foreach ( $cart as $item ) {
$product = isset( $item['data'] ) ? $item['data'] : '';
if ( empty( $product ) || ! $product instanceof WC_Product ) {
continue; // don't show items if there is no product
}
$price = isset( $products_price[ $product->get_id() ] ) ? $products_price[ $product->get_id() ] : null;
$line_total = is_null( $price ) ? BWFAN_Common::get_prices_with_tax( $product ) : $price;
?>
<div class="bwfan-product-grid-item-2-col bwfan-product-type-cart" style="<?php echo( $n % 2 ? '' : 'margin-right: 0;' ); ?>">
<?php if ( false === $disable_product_thumbnail ) : ?>
<?php if ( true === $cartItemLinkEnabled ) :
$cartItemLink = BWFAN_Common::decode_merge_tags( apply_filters( 'bwfan_block_editor_alter_cart_item_link', '{{cart_recovery_link}}' ) );
?>
<a href="<?php echo esc_url( $cartItemLink ); ?>" target="_blank">
<?php echo wp_kses_post( BWFAN_Common::get_product_image( $product, 'shop_catalog', false, 200 ) ); ?>
</a>
<?php else : ?>
<?php echo wp_kses_post( BWFAN_Common::get_product_image( $product, 'shop_catalog', false, 200 ) ); ?>
<?php endif; ?>
<?php endif; ?>
<h4 style="vertical-align:middle;"><?php echo wp_kses_post( BWFAN_Common::get_name( $product ) ); ?></h4>
<p class="price" style="vertical-align:middle;">
<?php if( false === BWFAN_Merge_Tag_Loader::get_data( 'is_preview' ) ): ?>
<strong>
<?php
echo BWFAN_Common::price( $line_total, $currency ); //phpcs:ignore WordPress.Security.EscapeOutput
?>
</strong>
<?php if ( $suffix && wc_tax_enabled() ): ?>
<small><?php echo $suffix; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></small>
<?php endif; ?>
<?php else: ?>
<strong><?php echo $price; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
<?php endif; ?>
</p>
</div>
<?php
$n ++;
}
} else {
foreach ( $products as $product ) {
if ( ! $product instanceof WC_Product ) {
continue;
}
$price = isset( $products_price[ $product->get_id() ] ) ? $products_price[ $product->get_id() ] : null;
$line_total = is_null( $price ) ? BWFAN_Common::get_prices_with_tax( $product ) : $price;
?>
<div class="bwfan-product-grid-item-2-col bwfan-product-type-product" style="<?php echo( $n % 2 ? '' : 'margin-right: 0;' ); ?>">
<?php
if ( true === $disable_product_link ) {
echo ( false === $disable_product_thumbnail ) ? BWFAN_Common::get_product_image( $product, 'shop_catalog', false, 200 ) : ''; //phpcs:ignore WordPress.Security.EscapeOutput ?>
<h4><?php echo wp_kses_post( BWFAN_Common::get_name( $product ) ); ?></h4>
<?php
} else {
if ( false === $disable_product_thumbnail ) {
?>
<a href="<?php echo esc_url_raw( $product->get_permalink() ); //phpcs:ignore WordPress.Security.EscapeOutput ?>"><?php echo wp_kses_post( BWFAN_Common::get_product_image( $product, 'shop_catalog', false, 200 ) ); //phpcs:ignore WordPress.Security.EscapeOutput ?></a>
<?php
}
?>
<h4 style="vertical-align:middle;">
<a href="<?php echo esc_url_raw( $product->get_permalink() ); //phpcs:ignore WordPress.Security.EscapeOutput ?>"><?php echo wp_kses_post( BWFAN_Common::get_name( $product ) ); ?></a>
</h4>
<?php
}
?>
<p class="price" style="vertical-align:middle;">
<strong><?php echo wp_kses_post( BWFAN_Common::price( $line_total ) ); //phpcs:ignore WordPress.Security.EscapeOutput ?></strong>
</p>
</div>
<?php
$n ++;
}
}
?>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<?php endif;

View File

@@ -0,0 +1,132 @@
<?php
$n = 1;
$currency = is_array( $data ) && isset( $data['currency'] ) ? $data['currency'] : '';
/** checking if woocommerce exists other wise return */
if ( ! function_exists( 'bwfan_is_woocommerce_active' ) || ! bwfan_is_woocommerce_active() ) {
return;
}
add_action( 'bwfan_output_email_style', function () { ?>
.bwfan-email-product-3-col .bwfan-product-grid {
width: 100%;
border-collapse: collapse;
max-width:700px;
}
.bwfan-email-product-3-col .bwfan-product-grid .bwfan-product-grid-item-3-col img {
height: auto !important;
}
.bwfan-email-product-3-col .bwfan-product-grid-item-3-col {
width: 29.5%;
display: inline-block;
text-align: center;
padding: 0 0 20px;
vertical-align: top;
word-wrap: break-word;
margin-right: 4%;
font-size: 14px;
}
#body_content .bwfan-email-product-3-col .bwfan-product-grid-item-3-col h4 {
text-align: center;
}
#body_content .bwfan-email-product-3-col .bwfan-product-grid-item-3-col p.price {
margin-bottom: 0;
}
<?php } );
if ( is_array( $products ) ) : ?>
<div class='bwfan-email-product-3-col bwfan-email-table-wrap'>
<table cellspacing="0" cellpadding="0" class="bwfan-product-grid">
<tbody>
<tr>
<td style="padding: 0;">
<div class="bwfan-product-grid-container">
<?php
$disable_product_link = BWFAN_Common::disable_product_link();
$disable_product_thumbnail = BWFAN_Common::disable_product_thumbnail();
if ( false !== $cart ) {
$cartItemLinkEnabled = apply_filters( 'bwfan_block_editor_enable_cart_item_link', true );
$suffix = BWFAN_Common::get_wc_tax_label_if_displayed();
foreach ( $cart as $item ) {
$product = isset( $item['data'] ) ? $item['data'] : '';
if ( empty( $product ) || ! $product instanceof WC_Product ) {
continue; // don't show items if there is no product
}
$price = isset( $products_price[ $product->get_id() ] ) ? $products_price[ $product->get_id() ] : null;
$line_total = is_null( $price ) ? BWFAN_Common::get_prices_with_tax( $product ) : $price;
?>
<div class="bwfan-product-grid-item-3-col bwfan-product-type-cart" style="<?php echo( $n % 3 ? '' : 'margin-right: 0;' ); ?>">
<?php if ( false === $disable_product_thumbnail ) : ?>
<?php if ( true === $cartItemLinkEnabled ) :
$cartItemLink = BWFAN_Common::decode_merge_tags( apply_filters( 'bwfan_block_editor_alter_cart_item_link', '{{cart_recovery_link}}' ) );
?>
<a href="<?php echo esc_url( $cartItemLink ); ?>" target="_blank">
<?php echo wp_kses_post( BWFAN_Common::get_product_image( $product, 'shop_catalog', false, 150 ) ); ?>
</a>
<?php else : ?>
<?php echo wp_kses_post( BWFAN_Common::get_product_image( $product, 'shop_catalog', false, 150 ) ); ?>
<?php endif; ?>
<?php endif; ?>
<h4 style="vertical-align:middle;"><?php echo wp_kses_post( BWFAN_Common::get_name( $product ) ); ?></h4>
<p class="price">
<?php if( false === BWFAN_Merge_Tag_Loader::get_data( 'is_preview' ) ): ?>
<strong>
<?php
echo BWFAN_Common::price( $line_total, $currency ); //phpcs:ignore WordPress.Security.EscapeOutput
?>
</strong>
<?php if ( $suffix && wc_tax_enabled() ): ?>
<small><?php echo $suffix; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></small>
<?php endif; ?>
<?php else: ?>
<strong><?php echo $price; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
<?php endif; ?>
</p>
</div>
<?php
$n ++;
}
} else {
foreach ( $products as $product ) {
if ( ! $product instanceof WC_Product ) {
continue;
}
$price = isset( $products_price[ $product->get_id() ] ) ? $products_price[ $product->get_id() ] : null;
$line_total = is_null( $price ) ? BWFAN_Common::get_prices_with_tax( $product ) : $price;
?>
<div class="bwfan-product-grid-item-3-col bwfan-product-type-product" style="<?php echo( $n % 3 ? '' : 'margin-right: 0;' ); ?>">
<?php
if ( true === $disable_product_link ) {
echo ( false === $disable_product_thumbnail ) ? BWFAN_Common::get_product_image( $product, 'shop_catalog', false, 150 ) : ''; //phpcs:ignore WordPress.Security.EscapeOutput ?>
<h4><?php echo wp_kses_post( BWFAN_Common::get_name( $product ) ); ?></h4>
<?php
} else {
if ( false === $disable_product_thumbnail ) {
?>
<a href="<?php echo esc_url_raw( $product->get_permalink() ); //phpcs:ignore WordPress.Security.EscapeOutput ?>"><?php echo wp_kses_post( BWFAN_Common::get_product_image( $product, 'shop_catalog', false, 150 ) ); //phpcs:ignore WordPress.Security.EscapeOutput ?></a>
<?php
}
?>
<h4 style="vertical-align:middle;">
<a href="<?php echo esc_url_raw( $product->get_permalink() ); //phpcs:ignore WordPress.Security.EscapeOutput ?>"><?php echo wp_kses_post( BWFAN_Common::get_name( $product ) ); ?></a>
</h4>
<?php
}
?>
<p class="price" style="vertical-align:middle;">
<strong><?php echo wp_kses_post( BWFAN_Common::price( $line_total ) ); //phpcs:ignore WordPress.Security.EscapeOutput ?></strong>
</p>
</div>
<?php
$n ++;
}
}
?>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<?php endif;

View File

@@ -0,0 +1,132 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$currency = is_array( $data ) && isset( $data['currency'] ) ? $data['currency'] : '';
/** checking if woocommerce exists other wise return */
if ( ! function_exists( 'bwfan_is_woocommerce_active' ) || ! bwfan_is_woocommerce_active() ) {
return;
}
add_action( 'bwfan_output_email_style', function () { ?>
.bwfan-email-product-rows .bwfan-product-rows {
width: 100%;
border: 2px solid #e5e5e5;
border-collapse: collapse;
max-width:700px;
}
#body_content .bwfan-email-product-rows .bwfan-product-rows td {
padding: 10px 12px;
}
<?php } );
if ( is_array( $products ) ) : ?>
<div class='bwfan-email-product-rows bwfan-email-table-wrap'>
<!--[if mso]>
<table>
<tr>
<td width="700">
<![endif]-->
<table cellspacing="0" cellpadding="0" style="width: 100%;" class="bwfan-product-rows">
<tbody>
<?php
$disable_product_link = BWFAN_Common::disable_product_link();
$disable_product_thumbnail = BWFAN_Common::disable_product_thumbnail();
if ( false !== $cart ) {
$cartItemLinkEnabled = apply_filters( 'bwfan_block_editor_enable_cart_item_link', true );
$suffix = BWFAN_Common::get_wc_tax_label_if_displayed();
foreach ( $cart as $item ) :
$product = isset( $item['data'] ) ? $item['data'] : '';
if ( empty( $product ) || ! $product instanceof WC_Product ) {
continue; // don't show items if there is no product
}
$price = isset( $products_price[ $product->get_id() ] ) ? $products_price[ $product->get_id() ] : null;
$line_total = is_null( $price ) ? BWFAN_Common::get_prices_with_tax( $product ) : $price;
?>
<tr>
<?php if ( false === $disable_product_thumbnail ) : ?>
<td class="image" width="100">
<?php if ( true === $cartItemLinkEnabled ) :
$cartItemLink = BWFAN_Common::decode_merge_tags( apply_filters( 'bwfan_block_editor_alter_cart_item_link', '{{cart_recovery_link}}' ) );
?>
<a href="<?php echo esc_url( $cartItemLink ); ?>" target="_blank">
<?php echo wp_kses_post( BWFAN_Common::get_product_image( $product, 'thumbnail', false, 100 ) ); ?>
</a>
<?php else : ?>
<?php echo wp_kses_post( BWFAN_Common::get_product_image( $product, 'thumbnail', false, 100 ) ); ?>
<?php endif; ?>
</td>
<?php endif; ?>
<td width="">
<h4 style="vertical-align:middle;"><?php echo wp_kses_post( BWFAN_Common::get_name( $product ) ); ?></h4>
</td>
<td align="right" class="last" width="100">
<?php if( false === BWFAN_Merge_Tag_Loader::get_data( 'is_preview' ) ): ?>
<?php
echo wp_kses_post( BWFAN_Common::price( $line_total, $currency ) );
?>
<?php if ( $suffix && wc_tax_enabled() ): ?>
<small><?php echo $suffix; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></small>
<?php endif; ?>
<?php else: ?>
<?php echo $price; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php endif; ?>
</td>
</tr>
<?php endforeach;
} else {
foreach ( $products as $product ) {
if ( ! $product instanceof WC_Product ) {
continue;
}
$price = isset( $products_price[ $product->get_id() ] ) ? $products_price[ $product->get_id() ] : null;
$line_total = is_null( $price ) ? BWFAN_Common::get_prices_with_tax( $product ) : $price;
?>
<tr>
<?php
if ( true === $disable_product_link ) {
if ( false === $disable_product_thumbnail ) {
?>
<td class="image" width="100">
<?php echo wp_kses_post( BWFAN_Common::get_product_image( $product, 'thumbnail', false, 100 ) ); //phpcs:ignore WordPress.Security.EscapeOutput ?>
</td>
<?php
} ?>
<td width="">
<h4 style="margin:0;"><?php echo wp_kses_post( BWFAN_Common::get_name( $product ) ); ?></h4>
</td>
<?php
} else {
if ( false === $disable_product_thumbnail ) {
?>
<td class="image" width="100">
<a href="<?php echo esc_url_raw( $product->get_permalink() ); //phpcs:ignore WordPress.Security.EscapeOutput ?>"><?php echo wp_kses_post( BWFAN_Common::get_product_image( $product, 'thumbnail', false, 100 ) ); //phpcs:ignore WordPress.Security.EscapeOutput ?></a>
</td>
<?php
}
?>
<td width="">
<h4 style="margin:0;">
<a href="<?php echo esc_url_raw( $product->get_permalink() ); //phpcs:ignore WordPress.Security.EscapeOutput ?>"><?php echo wp_kses_post( BWFAN_Common::get_name( $product ) ); ?></a>
</h4>
</td>
<?php
}
?>
<td align="right" class="last" width="">
<p class="price" style="margin: 18px 0 8px;"><?php echo wp_kses_post( BWFAN_Common::price( $line_total ) ); //phpcs:ignore WordPress.Security.EscapeOutput ?></p>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<!--[if mso]>
</td></tr></table>
<![endif]-->
</div>
<?php endif;

View File

@@ -0,0 +1,100 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$leave_a_review_text = ! empty( $attr['button_label'] ) ? $attr['button_label'] : __( 'Leave a review', 'wp-marketing-automations' );
$reviewable_products = [];
if ( is_array( $products ) ) {
/** Filter products to include only those with reviews allowed */
$reviewable_products = array_filter( $products, function ( $product ) {
if ( ! $product instanceof WC_Product ) {
return false;
}
$parent_product_id = $product->get_parent_id();
if ( ! empty( $parent_product_id ) ) {
$product = wc_get_product( $parent_product_id );
}
return $product->get_reviews_allowed();
} );
}
if ( empty( $reviewable_products ) ) {
return;
}
add_action( 'bwfan_output_email_style', function () {
$button_background_color = apply_filters( 'bwfan_wc_email_get_base_color', get_option( 'woocommerce_email_base_color' ) );
$button_text_color = BWFAN_Common::color_light_or_dark( $button_background_color, '#202020', '#ffffff' );
$button_text_color = apply_filters( 'bwfan_wc_email_get_text_color', $button_text_color );
?>
.bwfan-email-review-rows .bwfan-product-rows {
width: 100%;
border: 2px solid #e5e5e5;
border-collapse: collapse;
max-width:700px;
}
#body_content .bwfan-email-review-rows .bwfan-product-rows td {
padding: 10px 12px;
}
.bwfan-email-review-rows .autonami-button {
background-color: <?php echo esc_attr( $button_background_color ); ?>;
color: <?php echo esc_attr( $button_text_color ); ?>;
}
<?php
} );
$review_hash_path = apply_filters( 'bwfan_review_section_hash_path', '#tab-reviews' );
$order = $this->order instanceof WC_Order ? $this->order : null;
?>
<div class='bwfan-email-review-rows bwfan-email-table-wrap'>
<!--[if mso]>
<table>
<tr>
<td width="700">
<![endif]-->
<table cellspacing="0" cellpadding="0" style="width: 100%;" class="bwfan-product-rows">
<tbody>
<?php foreach ( $reviewable_products as $product ) :
if ( ! $product instanceof WC_Product ) {
continue;
}
$parent_product_id = $product->get_parent_id();
$review_link = $product->get_permalink();
if ( ! empty( $parent_product_id ) ) {
$parent_product = wc_get_product( $parent_product_id );
$review_link = $parent_product->get_permalink();
}
$review_link = apply_filters( 'bwfan_product_review_link', $review_link . $review_hash_path, $product, $order );
?>
<tr>
<td class="image" width="100">
<?php echo wp_kses_post( BWFAN_Common::get_product_image( $product, 'thumbnail', false, 100 ) ); //phpcs:ignore WordPress.Security.EscapeOutput
?>
</td>
<td width="">
<h4 style="vertical-align:middle;"><?php echo wp_kses_post( BWFAN_Common::get_name( $product ) ); ?></h4>
</td>
<td align="right" class="last" width="">
<a href="<?php echo esc_url_raw( $review_link ); //phpcs:ignore WordPress.Security.EscapeOutput
?>" class="autonami-button autonami-button--small">
<!--[if mso]>
<i style="letter-spacing: 25px;mso-font-width:-100%;mso-text-raise:30pt" hidden>&nbsp;</i>
<![endif]-->
<span style="mso-text-raise:15pt;"><?php echo apply_filters( 'bwfan_email_review_button_text', esc_html( wp_strip_all_tags( $leave_a_review_text ) ), $product, $order ); ?></span>
<!--[if mso]>
<i style="letter-spacing: 25px;mso-font-width:-100%" hidden>&nbsp;</i>
<![endif]-->
</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<!--[if mso]>
</td>
</tr>
</table>
<![endif]-->
</div>