Home Forums WoodMart support forum Company details not showing on Checkout and My Account page

Company details not showing on Checkout and My Account page

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #686094

    lemali.ch
    Participant

    Dear Support

    We have activated the Checkout fields manager.

    Unfortunately under Dashboard -> WooCommerce -> Checkout Fields we do not see company details.

    Is it possible to show this on checkout & my account?

    Best Regards
    Matt

    Attachments:
    You must be logged in to view attached files.
    #686100

    lemali.ch
    Participant

    We entered now this php code in the child theme file and now it works:

    // Checkout: bereits sichtbar/optional (falls noch nicht drin)
    add_filter( ‘woocommerce_checkout_fields’, function( $fields ) {
    if ( isset( $fields[‘billing’][‘billing_company’] ) ) {
    $fields[‘billing’][‘billing_company’][‘required’] = false;
    $fields[‘billing’][‘billing_company’][‘label’] = ‘Firmenname’;
    $fields[‘billing’][‘billing_company’][‘placeholder’]= ‘Firmenname’;
    $fields[‘billing’][‘billing_company’][‘priority’] = 25;
    }
    return $fields;
    }, 20 );

    // Mein Konto → Rechnungsadresse
    add_filter( ‘woocommerce_billing_fields’, function( $fields ) {
    $fields[‘billing_company’] = array_merge(
    array(
    ‘label’ => ‘Firmenname’,
    ‘placeholder’ => ‘Firmenname’,
    ‘required’ => false,
    ‘type’ => ‘text’,
    ‘class’ => array( ‘form-row-wide’ ),
    ‘priority’ => 25,
    ),
    isset( $fields[‘billing_company’] ) ? $fields[‘billing_company’] : array()
    );
    return $fields;
    }, 20 );

    // Mein Konto → Lieferadresse
    add_filter( ‘woocommerce_shipping_fields’, function( $fields ) {
    $fields[‘shipping_company’] = array_merge(
    array(
    ‘label’ => ‘Firmenname’,
    ‘placeholder’ => ‘Firmenname’,
    ‘required’ => false,
    ‘type’ => ‘text’,
    ‘class’ => array( ‘form-row-wide’ ),
    ‘priority’ => 25,
    ),
    isset( $fields[‘shipping_company’] ) ? $fields[‘shipping_company’] : array()
    );
    return $fields;
    }, 20 );

    But still the question, shouldn’t this work with the standard theme? We don’t have a checkout fields manager installed.

    BR

    Matt

    #686134

    Hello,

    We have not tested the code you refer to and we do not guarantee it would work. You need to find a third-party plugin to achieve more functionality that best suits you. We have not tested any with our theme, so we cannot guarantee any.

    Best Regards,

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