Removing fields from WC checkout

This topic contains 4 replies, has 2 voices, and was last updated by  Themosaurus 3 weeks, 3 days ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #4055

    alex
    Participant
    • 188 Posts
    @abourne

    Hello, applied some snippets to customise the checkout field. Works great – for desktop. For mobile, the UI is off.

    Do you have suggestions to make the fields properly display in full width for mobile?

    add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
    function woo_remove_product_tabs( $tabs ) {
    unset( $tabs['additional_information'] );
    return $tabs;
    }
    
    /* WooCommerce: The Code Below Removes The Additional Information Title Text */
    add_filter('woocommerce_enable_order_notes_field', '__return_false');
    
    add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
    
    function custom_override_checkout_fields( $fields ) {
    unset($fields['billing']['billing_company']);
    unset($fields['billing']['billing_address_1']);
    unset($fields['billing']['billing_address_2']);
    unset($fields['billing']['billing_country']);
    unset($fields['billing']['billing_state']);
    unset($fields['order']['order_comments']);;
    unset($fields['account']['account_username']);
    unset($fields['account']['account_password']);
    unset($fields['account']['account_password-2']);
    return $fields;
    }

    Hopefully these snippets are helpful and save time for others, as WC’s documentation did not quite provide this exact solution so clearly.

    Regards

    #4070

    Themosaurus
    Keymaster
    • 1561 Posts
    @themosaurus

    Hi @abourne,

    This is an issue with Gwangi, the checkout should not be displayed in two columns on mobile. This will be fixed in the next update, thank you for your feedback. In the meantime you can use this CSS snippet:

    @media screen and (max-width: 768px) {
    	#customer_details .col-1,
    	#customer_details .col-2 {
    		flex: 0 0 100%;
    		max-width: 100%;
    		padding-right: 0;
    	}
    }

    Please paste this CSS in the Custom CSS panel of your Customizer and it should resolve the issue.

    Regards

    #4091

    alex
    Participant
    • 188 Posts
    @abourne

    Worked perfectly. Appreciate it.

    #4092

    alex
    Participant
    • 188 Posts
    @abourne

    .

    #4873

    Themosaurus
    Keymaster
    • 1561 Posts
    @themosaurus

    Hi @abourne,

    We just wanted to notify you that we release a new update of Gwangi (v 1.1.9) that contains a fix for this issue.

    So, if you update your theme, you will be able to remove the CSS snippet that we previously gave you.

    As a reminder, to update your theme, you can download and install the Envato Market plugin (https://envato.com/market-plugin/) on your WordPress site.

    Once the plugin is installed and activated, go to “Envato Market” in your admin menu and follow the instructions under “Activate Envato API Connection”.

    When this is done, you will see your purchased themes under the “Themes” tab and you should be able to update your Gwangi theme from there by clicking the “Update available” button.

    Finally, don’t forget to update your child theme if you are using one, and update all the Grimlock plugins to their latest versions.

    Regards,

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

The topic ‘Removing fields from WC checkout’ is closed to new replies.