• 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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author vendidero

    (@vendidero)

    Hi there,

    well, which text do you mean exactly? Some texts may be adjusted by adjusting the shipping provider settings within WooCommerce > Settings > Germanized > Shipping Provider.

    Those texts are being attached via hooks, see: https://github.com/vendidero/woocommerce-germanized-shipments/blob/master/src/Emails.php

    Cheers

    Thread Starter rickkdev

    (@rickkdev)

    @vendidero In the customer return shipment email (generated by the PHP mentioned above) the text is saying that the return will be processed in 1-2 business days. We want to change this description.

    As you described, I also tried to find something in WooCommerce > Settings > Germanized > Post& DHL (shipping provider) that allows me to change the generated text in the email. However, I could not find anything here

    Plugin Author vendidero

    (@vendidero)

    Hi,

    mostly defaults are being used within the PHP templates. Please check the return request settings (it’s a separate section within the shipping provider settings). You might provide customized return instructions at that place.

    Cheers

    Thread Starter rickkdev

    (@rickkdev)

    Got it thanks

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

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