• Resolved arifulfurkan

    (@arifulfurkan)


    Hi,
    Thank you so much for this amazing plugin. But i think Phone & Email Address should be under billing, shipping address on the top. Because i will print this, i could check the name, address, phone, email etc at a place. Otherwise, My eyes need to up and down multiple times. Hope that you will understand the issue. Here is the screesnhot https://prnt.sc/5UoAhA5g4xF4

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • moksha shah

    (@mokshasharmila13)

    Hello @arifulfurkan,

    As you want to display phone & Email address under billing, shipping address on the top, as you shown on screenshot. Please add the below code in your active theme’s functions.php file or using a plugin like Code Snippets:

    add_filter( 'wcdn_address_billing', 'change_billing_email', 10, 2 );
     function change_billing_email( $billing_email, $order) {
    		$country_code = $order->get_billing_country();
    		$state_code   = $order->get_billing_state();
    		
    		$countries = new WC_Countries(); // Get an instance of the WC_Countries Object
    		
    		$country_states = $countries->get_states( $country_code ); // Get the states array from a country code
    		$state_name     = $country_states[$state_code]; // get the state name
    		$billing_email = 
    			'Address 1: ' . $order->get_billing_address_1() . ',<br>' .
    			'Address 2: ' . $order->get_billing_address_2() . ',<br> ' .
    			'City: ' . $order->get_billing_city() . ',<br>' . 
    			'State : ' . $state_name . '<br>' .
    			'Email :' . $order->get_billing_email() . '<br>' .
    			'Telephone : ' . $order->get_billing_phone() . '.' ;
    
    	 return $billing_email ;
    }

    For removing the Email address & phone from where it is currently shown at the bottom, just replace the below file in the path: woocommerce-delivery-notes/includes/

    https://www.dropbox.com/s/ruekiefrhbr1q4c/wcdn-template-functions.php?dl=0

    Please note that updating to a new version of the plugin will wipe out these changes.

    Thread Starter arifulfurkan

    (@arifulfurkan)

    Thank you so much for your support

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Phone & Email Address should be under billing, shipping address’ is closed to new replies.