{"id":12175802,"date":"2023-11-27T19:34:50","date_gmt":"2023-11-27T22:34:50","guid":{"rendered":"https:\/\/br.wordpress.org\/support\/topic\/woocomerce-e-mail-de-nova-conta-para-o-cliente\/"},"modified":"2023-11-27T19:34:50","modified_gmt":"2023-11-27T22:34:50","slug":"woocomerce-e-mail-de-nova-conta-para-o-cliente","status":"publish","type":"topic","link":"https:\/\/br.wordpress.org\/support\/topic\/woocomerce-e-mail-de-nova-conta-para-o-cliente\/","title":{"rendered":"Woocomerce &#8211; E-mail de Nova Conta para o cliente"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Gostaria de informar o <strong>E-MAIL DO CLIENTE<\/strong> no corpo do e-mail enviado ao cliente quando ele se registra na loja.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Na ocasi\u00e3o, o template original s\u00f3 permite que seja informado o nome de usu\u00e1rio. Segue o c\u00f3digo:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n\/**\n * Customer new account email\n *\n * This template can be overridden by copying it to yourtheme\/woocommerce\/emails\/customer-new-account.php.\n *\n * HOWEVER, on occasion WooCommerce will need to update template files and you\n * (the theme developer) will need to copy the new files to your theme to\n * maintain compatibility. We try to do this as little as possible, but it does\n * happen. When this occurs the version of the template file will be bumped and\n * the readme will list any important changes.\n *\n * @see https:\/\/docs.woocommerce.com\/document\/template-structure\/\n * @package WooCommerce\\Templates\\Emails\n * @version 6.0.0\n *\/\n\ndefined( 'ABSPATH' ) || exit;\n\ndo_action( 'woocommerce_email_header', $email_heading, $email ); ?&gt;\n\n&lt;?php \/* translators: %s: Customer username *\/ ?&gt;\n&lt;p&gt;&lt;?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ); ?&gt;&lt;\/p&gt;\n&lt;?php \/* translators: %1$s: Site title, %2$s: Username, %3$s: My account link *\/ ?&gt;\n&lt;p&gt;&lt;?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 ), '&lt;strong&gt;' . esc_html( $user_login ) . '&lt;\/strong&gt;', make_clickable( esc_url( wc_get_page_permalink( 'myaccount' ) ) ) ); \/\/ phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?&gt;&lt;\/p&gt;\n&lt;?php if ( 'yes' === get_option( 'woocommerce_registration_generate_password' ) &amp;&amp; $password_generated &amp;&amp; $set_password_url ) : ?&gt;\n\t&lt;?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 ?&gt;\n\t&lt;p&gt;&lt;a href=\"&lt;?php echo esc_attr( $set_password_url ); ?&gt;\"&gt;&lt;?php printf( esc_html__( 'Click here to set your new password.', 'woocommerce' ) ); ?&gt;&lt;\/a&gt;&lt;\/p&gt;\n&lt;?php endif; ?&gt;\n\n&lt;?php\n\/**\n * Show user-defined additional content - this is set in each email's settings.\n *\/\nif ( $additional_content ) {\n\techo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );\n}\n\ndo_action( 'woocommerce_email_footer', $email );\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Como podem ver no trecho abaixo onde tem &lt;strong&gt;&#8217; . esc_html( $user_login ) . &#8216;&lt;\/strong&gt;, \u00e9 onde retorna o nome de usu\u00e1rio do cliente:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;p&gt;&lt;?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 ), '&lt;strong&gt;' . esc_html( $user_login ) . '&lt;\/strong&gt;', make_clickable( esc_url( wc_get_page_permalink( 'myaccount' ) ) ) ); \/\/ phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?&gt;&lt;\/p&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Portanto, gostaria de exibir o e-mail ao inv\u00e9s do nome de usu\u00e1rio do cliente.<br \/>J\u00e1 tentei utilizar algumas outras vari\u00e1veis, mas sem sucesso:<br \/>user_email<br \/>billing_email<br \/>Nenhuma delas retorna o e-mail, retorna apenas vazio. Gostaria de uma solu\u00e7\u00e3o, algu\u00e9m poderia me ajudar nisso?<\/p>\n","protected":false},"template":"","class_list":["post-12175802","topic","type-topic","status-publish","hentry","topic-tag-e-mail","topic-tag-woocommerce"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/br.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12175802","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/br.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/br.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/br.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12175802\/revisions"}],"wp:attachment":[{"href":"https:\/\/br.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=12175802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}