WordPress.org

Support

print postcode under phone

  • YASSEROVIC

    @yasserovic

    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/

Viewing 1 replies (of 1 total)
  • 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');
Viewing 1 replies (of 1 total)
  • The topic ‘print postcode under phone’ is closed to new replies.
Skip to toolbar