• Resolved rickkdev

    (@rickkdev)


    Hello guys,
    Ive been trying to find a way to change the customer-return-shipment Email body.

    here is the whole PHP file:

    <?php
    /**
     * Customer return shipment
     *
     * This template can be overridden by copying it to yourtheme/woocommerce-germanized/emails/customer-return-shipment.php.
     *
     * HOWEVER, on occasion Germanized will need to update template files and you
     * (the theme developer) will need to copy the new files to your theme to
     * maintain compatibility. We try to do this as little as possible, but it does
     * happen. When this occurs the version of the template file will be bumped and
     * the readme will list any important changes.
     *
     * @see https://github.com/vendidero/woocommerce-germanized/wiki/Overriding-Germanized-Templates
     * @package Germanized/Shipments/Templates/Emails
     * @version 1.0.0
     */
    if ( ! defined( 'ABSPATH' ) ) {
    	exit;
    }
    
    /*
     * @hooked WC_Emails::email_header() Output the email header
     */
    do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
    
    <?php /* translators: %s: Customer first name */ ?>
    	<p><?php printf( __( 'Hi %s,', 'woocommerce' ), $order->get_billing_first_name() ); ?></p><?php // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>
    
    	<p>
    		<?php
    		if ( $is_confirmation ) {
    			_ex( 'Your return request has been accepted. Please follow the instructions beneath to return your shipment.', 'shipments', 'woocommerce-germanized' );
    		} else {
    			_ex( 'A new return has been added to your order. Please follow the instructions beneath to return your shipment.', 'shipments', 'woocommerce-germanized' );
    		}
    		?>
    	</p>
    <?php
    
    /*
     * Output Email details for a Shipment.
     *
     * @hooked \Vendidero\Germanized\Shipments\Email::email_tracking() Adds tracking info.
     * @hooked \Vendidero\Germanized\Shipments\Email::email_address() Adds shipping address.
     * @hooked \Vendidero\Germanized\Shipments\Email::email_details() Adds shipment table.
     *
     * @param \Vendidero\Germanized\Shipments\Shipment $shipment The shipment instance.
     * @param boolean                                  $sent_to_admin Whether to send this email to admin or not.
     * @param boolean                                  $plain_text Whether this email is in plaintext format or not.
     * @param WC_Email                                 $email The email instance.
     *
     * @since 3.0.0
     * @package Vendidero/Germanized/Shipments
     */
    do_action( 'woocommerce_gzd_email_shipment_details', $shipment, $sent_to_admin, $plain_text, $email );
    
    /**
     * Show user-defined additional content - this is set in each email's settings.
     */
    if ( $additional_content ) {
    	echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
    }
    
    /*
     * @hooked WC_Emails::email_footer() Output the email footer
     */
    do_action( 'woocommerce_email_footer', $email );
    

    So Im looking specially at this line:
    do_action( 'woocommerce_gzd_email_shipment_details', $shipment, $sent_to_admin, $plain_text, $email );

    I cant find

    woocommerce_gzd_email_shipment_details

    anyone can help me here? I just want to change the text that this email includes not the template components.

    • This topic was modified 5 years, 1 month ago by rickkdev.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Hi there 👋

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    Cheers!

    Thread Starter rickkdev

    (@rickkdev)

    @gabrielfuentes Is it that complex? In the email body it says that the return will be processed within 1-2 business days. I would like to change this to 14 days. But I can’t find a handle in the wordpress CMS to change this nor the file in the server files to change the text.

    Plugin Support slash1andy

    (@slash1andy)

    Automattic Happiness Engineer

    Hey again!

    This is not a default WooCommerce email, nor a WooCommerce function.

    This is added in by a plugin that is used on the site, the “Germanized” plugin.

    You’d want to contact them for more help with this if you are still looking for specific support.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Change Customer Return Shipment Email content’ is closed to new replies.