[Plugin: WooCommerce – excelling eCommerce] edit functions.php for Customising checkout fields
-
Hi
i want to remove some fields from checkout form but i cant
in here explain:
https://wcdocs.woothemes.com/snippets/tutorial-customising-checkout-fields-using-hooks-and-filters/#section-2in this page say for remove fields add this code in functions.php
// Hook in add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); // Our hooked in function - $fields is passed via the filter! function custom_override_checkout_fields( $fields ) { unset($fields['order']['order_comments']); return $fields; }
i test it but no any change
can anybody help me ?functions.php code :
<?php /*-----------------------------------------------------------------------------------*/ /* Start WooThemes Functions - Please refrain from editing this section */ /*-----------------------------------------------------------------------------------*/ // Define the theme-specific key to be sent to PressTrends. define( 'WOO_PRESSTRENDS_THEMEKEY', '80cpmgmo9pspi70ck31cwaapn47s7f6dh' ); // WooFramework init require_once ( get_template_directory() . '/functions/admin-init.php' ); /*-----------------------------------------------------------------------------------*/ /* Load the theme-specific files, with support for overriding via a child theme. /*-----------------------------------------------------------------------------------*/ $includes = array( 'includes/theme-options.php', // Options panel settings and custom settings 'includes/theme-functions.php', // Custom theme functions 'includes/theme-actions.php', // Theme actions & user defined hooks 'includes/theme-comments.php', // Custom comments/pingback loop 'includes/theme-js.php', // Load JavaScript via wp_enqueue_script 'includes/sidebar-init.php', // Initialize widgetized areas 'includes/theme-widgets.php', // Theme widgets 'includes/theme-install.php', // Theme installation 'includes/theme-woocommerce.php' // WooCommerce specific ); // Allow child themes/plugins to add widgets to be loaded. $includes = apply_filters( 'woo_includes', $includes ); foreach ( $includes as $i ) { locate_template( $i, true ); } /*-----------------------------------------------------------------------------------*/ /* You can add custom functions below */ /*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/ /* Don't add any code below here or the sky will fall down */ /*-----------------------------------------------------------------------------------*/ ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: WooCommerce – excelling eCommerce] edit functions.php for Customising checkout fields’ is closed to new replies.