Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8915
    Avatarstas
    Support Expired

    I need to make my City by default
    how is correct to name custom fields in function.php
    also tell me how delete cache of theme, may be there is a link what need to use for it?

    <?php
    /**
    * Theme functions and definitions.
    */
    add_filter(‘woocommerce_breadcrumb_defaults’, ‘piizalian_woocommerce_breadcrumb_defaults’);
    function piizalian_woocommerce_breadcrumb_defaults($args){
    $args[‘home’] = _x( ‘Principala’, ‘breadcrumb’, ‘piizalian’ );
    return $args;
    }
    
    add_filter( ‘woocommerce_checkout_fields’, ‘custom_checkout_fields’ );
    
    function custom_checkout_fields( $fields ) {
    $fields[‘billing’][‘billing_city’][‘default’] = ‘Bucuresti’;
    $fields[‘shipping’][‘shipping_city’][‘default’] = ‘Bucuresti’;
    return $fields;
    }
    • This topic was modified 1 year, 9 months ago by SupporterSupporter.
    #8925

    Hi,

    I see your code is still working properly: https://prnt.sc/kZWlNftIcDiL

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.