customer-invoice.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /**
  3. * Customer invoice email (plain text)
  4. *
  5. * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/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/Plain
  16. * @version 2.5.0
  17. */
  18. if ( ! defined( 'ABSPATH' ) ) {
  19. exit;
  20. }
  21. echo '= ' . esc_html( $email_heading ) . " =\n\n";
  22. if ( $order->has_status( 'pending' ) ) {
  23. echo sprintf(
  24. /* translators: %1s item is the name of the site, %2s is a html link */
  25. esc_html__( 'An order has been created for you on %1$s. %2$s', 'woocommerce' ),
  26. esc_html( get_bloginfo( 'name', 'display' ) ),
  27. esc_url( $order->get_checkout_payment_url() )
  28. ) . "\n\n";
  29. }
  30. echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
  31. /**
  32. * Hook for the woocommerce_email_order_details.
  33. *
  34. * @hooked WC_Emails::order_details() Shows the order details table.
  35. * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
  36. * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
  37. * @since 2.5.0
  38. */
  39. do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
  40. echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
  41. /**
  42. * Hook for the woocommerce_email_order_meta.
  43. *
  44. * @hooked WC_Emails::order_meta() Shows order meta data.
  45. */
  46. do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
  47. /**
  48. * Hook for woocommerce_email_customer_details
  49. *
  50. * @hooked WC_Emails::customer_details() Shows customer details
  51. * @hooked WC_Emails::email_address() Shows email address
  52. */
  53. do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
  54. echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
  55. echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );