block
1 month ago
plain
1 month ago
admin-cancelled-order.php
1 year ago
admin-failed-order.php
7 months ago
admin-new-order.php
7 months ago
admin-payment-gateway-enabled.php
2 months ago
customer-cancelled-order.php
7 months ago
customer-completed-order.php
7 months ago
customer-failed-order.php
7 months ago
customer-fulfillment-created.php
7 months ago
customer-fulfillment-deleted.php
7 months ago
customer-fulfillment-updated.php
1 month ago
customer-invoice.php
7 months ago
customer-new-account.php
7 months ago
customer-note.php
7 months ago
customer-on-hold-order.php
7 months ago
customer-pos-completed-order.php
7 months ago
customer-pos-refunded-order.php
7 months ago
customer-processing-order.php
7 months ago
customer-refunded-order.php
7 months ago
customer-reset-password.php
7 months ago
customer-stock-notification-verified.php
9 months ago
customer-stock-notification-verify.php
9 months ago
customer-stock-notification.php
9 months ago
email-addresses.php
4 months ago
email-customer-details.php
1 year ago
email-downloads.php
7 months ago
email-footer.php
7 months ago
email-fulfillment-details.php
2 months ago
email-fulfillment-items.php
1 month ago
email-header.php
2 months ago
email-mobile-messaging.php
2 years ago
email-order-details.php
1 month ago
email-order-items.php
1 month ago
email-styles.php
1 month ago
customer-new-account.php
77 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Customer new account email |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-new-account.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://woocommerce.com/document/template-structure/ |
| 14 | * @package WooCommerce\Templates\Emails |
| 15 | * @version 10.4.0 |
| 16 | */ |
| 17 | |
| 18 | use Automattic\WooCommerce\Utilities\FeaturesUtil; |
| 19 | |
| 20 | defined( 'ABSPATH' ) || exit; |
| 21 | |
| 22 | $email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' ); |
| 23 | |
| 24 | /** |
| 25 | * Fires to output the email header. |
| 26 | * |
| 27 | * @hooked WC_Emails::email_header() |
| 28 | * |
| 29 | * @since 3.7.0 |
| 30 | */ |
| 31 | do_action( 'woocommerce_email_header', $email_heading, $email ); ?> |
| 32 | |
| 33 | <?php echo $email_improvements_enabled ? '<div class="email-introduction">' : ''; ?> |
| 34 | <?php /* translators: %s: Customer username */ ?> |
| 35 | <p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ); ?></p> |
| 36 | <?php if ( $email_improvements_enabled ) : ?> |
| 37 | <?php /* translators: %s: Site title */ ?> |
| 38 | <p><?php printf( esc_html__( 'Thanks for creating an account on %s. Here’s a copy of your user details.', 'woocommerce' ), esc_html( $blogname ) ); ?></p> |
| 39 | <div class="hr hr-top"></div> |
| 40 | <?php /* translators: %s: Username */ ?> |
| 41 | <p><?php echo wp_kses( sprintf( __( 'Username: <b>%s</b>', 'woocommerce' ), esc_html( $user_login ) ), array( 'b' => array() ) ); ?></p> |
| 42 | <?php if ( $password_generated && $set_password_url ) : ?> |
| 43 | <?php // If the password has not been set by the user during the sign up process, send them a link to set a new password. ?> |
| 44 | <p><a href="<?php echo esc_attr( $set_password_url ); ?>"><?php printf( esc_html__( 'Set your new password.', 'woocommerce' ) ); ?></a></p> |
| 45 | <?php endif; ?> |
| 46 | <div class="hr hr-bottom"></div> |
| 47 | <p><?php echo esc_html__( 'You can access your account area to view orders, change your password, and more via the link below:', 'woocommerce' ); ?></p> |
| 48 | <p><a href="<?php echo esc_attr( wc_get_page_permalink( 'myaccount' ) ); ?>"><?php printf( esc_html__( 'My account', 'woocommerce' ) ); ?></a></p> |
| 49 | <?php else : ?> |
| 50 | <?php /* translators: %1$s: Site title, %2$s: Username, %3$s: My account link */ ?> |
| 51 | <p><?php printf( esc_html__( 'Thanks for creating an account on %1$s. Your username is %2$s. You can access your account area to view orders, change your password, and more at: %3$s', 'woocommerce' ), esc_html( $blogname ), '<strong>' . esc_html( $user_login ) . '</strong>', make_clickable( esc_url( wc_get_page_permalink( 'myaccount' ) ) ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p> |
| 52 | <?php if ( $password_generated && $set_password_url ) : ?> |
| 53 | <?php // If the password has not been set by the user during the sign up process, send them a link to set a new password. ?> |
| 54 | <p><a href="<?php echo esc_attr( $set_password_url ); ?>"><?php printf( esc_html__( 'Click here to set your new password.', 'woocommerce' ) ); ?></a></p> |
| 55 | <?php endif; ?> |
| 56 | <?php endif; ?> |
| 57 | <?php echo $email_improvements_enabled ? '</div>' : ''; ?> |
| 58 | |
| 59 | <?php |
| 60 | /** |
| 61 | * Show user-defined additional content - this is set in each email's settings. |
| 62 | */ |
| 63 | if ( $additional_content ) { |
| 64 | echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content email-additional-content-aligned">' : ''; |
| 65 | echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); |
| 66 | echo $email_improvements_enabled ? '</td></tr></table>' : ''; |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * Fires to output the email footer. |
| 71 | * |
| 72 | * @hooked WC_Emails::email_footer() |
| 73 | * |
| 74 | * @since 3.7.0 |
| 75 | */ |
| 76 | do_action( 'woocommerce_email_footer', $email ); |
| 77 |