Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Cyrus180

    (@cyrus180)

    Hallo vendidero,

    danke für deine Hilfe. Ich konnte mir damit den entsprechenden Code zusammenbauen. Für alle, die das gleiche oder ein ähnliches Problem haben, einfach folgenden Code in die functions.php einbinden und bei Bedarf abändern:

    /**
     * Change address format.
     * Put the title in it's own line.
     */
    function change_address_format( $formats ) {
        $formats[ 'DE' ]  = "{company}\n{title}\n{name}\n{address_1}\n{address_2}\n{postcode} {city}\n{country}";
    
        return $formats;
    }
    add_filter( 'woocommerce_localisation_address_formats', 'change_address_format', 20 );
    
    /**
     * Remove the title from the name.
     */
    function remove_title_from_name( $replacements, $args ) {
        $replacements[ '{name}' ] = $replacements[ '{first_name}' ] . ' ' . $replacements[ '{last_name}' ];
        $replacements[ '{name_upper}' ] = $replacements[ '{first_name_upper}' ] . ' ' . $replacements[ '{last_name_upper}' ];
        return $replacements;
    }
    add_filter( 'woocommerce_formatted_address_replacements', 'remove_title_from_name', 10, 2 );
    Thread Starter Cyrus180

    (@cyrus180)

    I already read this codex entry (I’ve got the code above from there) but it doesn’t work. I even deleted the is_home query but it’s not working. For example if I’m on post D and click Next Post I’m coming to A.

    Hi all,

    same issue here. Hope you can fix it soon.:-)

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