WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce Print Invoice & Delivery Note
print postcode under phone (2 posts)

  1. YASSEROVIC
    Member
    Posted 1 year ago #

    Hi,
    I want to add postcode into print page
    so I try to add this code in "woocommerce-delivery-notes.php"

    code :

    /**
     * Show billing postcode
     */
    if ( !function_exists( 'wcdn_billing_postcode' ) ) {
    	function wcdn_billing_postcode() {
    		global $wcdn;
    		echo $wcdn->print->get_order()->billing_postcode;
    	}
    }

    and nothing change :( !

    is there another place to edit ??

    thanks,

    http://wordpress.org/extend/plugins/woocommerce-delivery-notes/

  2. nyenius
    Member
    Posted 1 year ago #

    Try go to /plugins/woocommerce/classes/class-wc-countries.php and edit your country localization address format.

    Or add custom filter like in the faq :

    How can I change the address format of the recipient?
    WooCommerce includes address formats for many different countries. But maybe your country format isn't included. For such cases you can define your own format with a filter in your functions.php if you know your country code (ie LI).

    function custom_localisation_address_formats($formats) {
        $formats['LI'] = "{company}\n{name}\n{address_1}\n{address_2}\n{postcode} {city}\n{country}";
        return $formats;
    }
    add_filter('woocommerce_localisation_address_formats', 'custom_localisation_address_formats');

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic