No Description

html-merchant-notification.php 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * Merchant notification email
  4. *
  5. * @package WooCommerce\Admin\Templates\Emails\HTML
  6. */
  7. defined( 'ABSPATH' ) || exit;
  8. /*
  9. * @hooked WC_Emails::email_header() Output the email header
  10. */
  11. do_action( 'woocommerce_email_header', $email_heading, $email );
  12. ?>
  13. <?php if ( isset( $email_image ) ) { ?>
  14. <div>
  15. <img src="<?php echo esc_url( $email_image ); ?>" style="display: block; margin-bottom: 24px; width: 180px;"/>
  16. </div>
  17. <?php } ?>
  18. <?php
  19. echo wp_kses(
  20. $email_content,
  21. array(
  22. 'a' => array(
  23. 'href' => array(),
  24. 'title' => array(),
  25. ),
  26. 'br' => array(),
  27. 'em' => array(),
  28. 'strong' => array(),
  29. )
  30. );
  31. $base_color = get_option( 'woocommerce_email_base_color' );
  32. $base_text = wc_light_or_dark( $base_color, '#202020', '#ffffff' );
  33. $container_styles = 'margin-top: 25px;';
  34. $buttons_styles = "
  35. font-style: normal;
  36. font-weight: normal;
  37. font-size: 13px;
  38. line-height: 18px;
  39. text-align: center;
  40. color: {$base_text};
  41. margin-right: 15px;
  42. text-decoration: none;
  43. background: {$base_color};
  44. border: 1px solid {$base_color};
  45. border-radius: 3px;
  46. padding: 6px 15px;";
  47. ?>
  48. <div style="<?php echo esc_attr( $container_styles ); ?>">
  49. <?php foreach ( $email_actions as $an_action ) : ?>
  50. <a href="<?php echo esc_url( $trigger_note_action_url . $an_action->id ); ?>" style="<?php echo esc_attr( $buttons_styles ); ?>">
  51. <?php
  52. echo esc_html( $an_action->label );
  53. ?>
  54. </a>
  55. <?php endforeach; ?>
  56. </div>
  57. <div style="opacity: 0;">
  58. <img src="<?php echo esc_url( $opened_tracking_url ); ?>" />
  59. </div>
  60. <?php
  61. /*
  62. * @hooked WC_Emails::email_footer() Output the email footer
  63. */
  64. do_action( 'woocommerce_email_footer', $email );