Nenhuma Descrição

customer-invoice.php 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. /**
  3. * Customer invoice email
  4. *
  5. * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-invoice.php.
  6. *
  7. * HOWEVER, on occasion WooCommerce will need to update template files and you
  8. * (the theme developer) will need to copy the new files to your theme to
  9. * maintain compatibility. We try to do this as little as possible, but it does
  10. * happen. When this occurs the version of the template file will be bumped and
  11. * the readme will list any important changes.
  12. *
  13. * @see https://docs.woocommerce.com/document/template-structure/
  14. * @package WooCommerce\Templates\Emails
  15. * @version 3.7.0
  16. */
  17. if ( ! defined( 'ABSPATH' ) ) {
  18. exit;
  19. }
  20. /**
  21. * Executes the e-mail header.
  22. *
  23. * @hooked WC_Emails::email_header() Output the email header
  24. */
  25. do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
  26. <?php /* translators: %s: Customer first name */ ?>
  27. <p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
  28. <?php if ( $order->needs_payment() ) { ?>
  29. <p>
  30. <?php
  31. printf(
  32. wp_kses(
  33. /* translators: %1$s Site title, %2$s Order pay link */
  34. __( 'An order has been created for you on %1$s. Your invoice is below, with a link to make payment when you’re ready: %2$s', 'woocommerce' ),
  35. array(
  36. 'a' => array(
  37. 'href' => array(),
  38. ),
  39. )
  40. ),
  41. esc_html( get_bloginfo( 'name', 'display' ) ),
  42. '<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay for this order', 'woocommerce' ) . '</a>'
  43. );
  44. ?>
  45. </p>
  46. <?php } else { ?>
  47. <p>
  48. <?php
  49. /* translators: %s Order date */
  50. printf( esc_html__( 'Here are the details of your order placed on %s:', 'woocommerce' ), esc_html( wc_format_datetime( $order->get_date_created() ) ) );
  51. ?>
  52. </p>
  53. <?php
  54. }
  55. /**
  56. * Hook for the woocommerce_email_order_details.
  57. *
  58. * @hooked WC_Emails::order_details() Shows the order details table.
  59. * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
  60. * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
  61. * @since 2.5.0
  62. */
  63. do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
  64. /**
  65. * Hook for the woocommerce_email_order_meta.
  66. *
  67. * @hooked WC_Emails::order_meta() Shows order meta data.
  68. */
  69. do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
  70. /**
  71. * Hook for woocommerce_email_customer_details.
  72. *
  73. * @hooked WC_Emails::customer_details() Shows customer details
  74. * @hooked WC_Emails::email_address() Shows email address
  75. */
  76. do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
  77. /**
  78. * Show user-defined additional content - this is set in each email's settings.
  79. */
  80. if ( $additional_content ) {
  81. echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
  82. }
  83. /**
  84. * Executes the email footer.
  85. *
  86. * @hooked WC_Emails::email_footer() Output the email footer
  87. */
  88. do_action( 'woocommerce_email_footer', $email );