No Description

customer-invoice.php 2.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. * @package WooCommerce\Templates\Emails\Plain
  15. * @version 3.7.0
  16. */
  17. defined( 'ABSPATH' ) || exit;
  18. echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
  19. echo esc_html( wp_strip_all_tags( $email_heading ) );
  20. echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
  21. /* translators: %s: Customer first name */
  22. echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
  23. if ( $order->has_status( 'pending' ) ) {
  24. echo wp_kses_post(
  25. sprintf(
  26. /* translators: %1$s: Site title, %2$s: Order pay link */
  27. __( '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' ),
  28. esc_html( get_bloginfo( 'name', 'display' ) ),
  29. esc_url( $order->get_checkout_payment_url() )
  30. )
  31. ) . "\n\n";
  32. } else {
  33. /* translators: %s: Order date */
  34. echo sprintf( esc_html__( 'Here are the details of your order placed on %s:', 'woocommerce' ), esc_html( wc_format_datetime( $order->get_date_created() ) ) ) . "\n\n";
  35. }
  36. /**
  37. * Hook for the woocommerce_email_order_details.
  38. *
  39. * @hooked WC_Emails::order_details() Shows the order details table.
  40. * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
  41. * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
  42. * @since 2.5.0
  43. */
  44. do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
  45. echo "\n----------------------------------------\n\n";
  46. /**
  47. * Hook for the woocommerce_email_order_meta.
  48. *
  49. * @hooked WC_Emails::order_meta() Shows order meta data.
  50. */
  51. do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
  52. /**
  53. * Hook for woocommerce_email_customer_details
  54. *
  55. * @hooked WC_Emails::customer_details() Shows customer details
  56. * @hooked WC_Emails::email_address() Shows email address
  57. */
  58. do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
  59. echo "\n\n----------------------------------------\n\n";
  60. /**
  61. * Show user-defined additional content - this is set in each email's settings.
  62. */
  63. if ( $additional_content ) {
  64. echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
  65. echo "\n\n----------------------------------------\n\n";
  66. }
  67. echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );