customer-invoice.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. * @author WooThemes
  15. * @package WooCommerce/Templates/Emails
  16. * @version 3.3.0
  17. */
  18. if ( ! defined( 'ABSPATH' ) ) {
  19. exit;
  20. }
  21. /**
  22. * Executes the e-mail header.
  23. *
  24. * @hooked WC_Emails::email_header() Output the email header
  25. */
  26. do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
  27. <?php if ( $order->has_status( 'pending' ) ) : ?>
  28. <p>
  29. <?php
  30. printf(
  31. wp_kses(
  32. /* translators: %1s item is the name of the site, %2s is a html link */
  33. __( 'An order has been created for you on %1$s. %2$s', 'woocommerce' ),
  34. array(
  35. 'a' => array(
  36. 'href' => array(),
  37. ),
  38. )
  39. ),
  40. esc_html( get_bloginfo( 'name', 'display' ) ),
  41. '<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay for this order', 'woocommerce' ) . '</a>'
  42. );
  43. ?>
  44. </p>
  45. <?php endif; ?>
  46. <?php
  47. /**
  48. * Hook for the woocommerce_email_order_details.
  49. *
  50. * @hooked WC_Emails::order_details() Shows the order details table.
  51. * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
  52. * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
  53. * @since 2.5.0
  54. */
  55. do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
  56. /**
  57. * Hook for the woocommerce_email_order_meta.
  58. *
  59. * @hooked WC_Emails::order_meta() Shows order meta data.
  60. */
  61. do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
  62. /**
  63. * Hook for woocommerce_email_customer_details.
  64. *
  65. * @hooked WC_Emails::customer_details() Shows customer details
  66. * @hooked WC_Emails::email_address() Shows email address
  67. */
  68. do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
  69. /**
  70. * Executes the email footer.
  71. *
  72. * @hooked WC_Emails::email_footer() Output the email footer
  73. */
  74. do_action( 'woocommerce_email_footer', $email );