add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
function custom_override_checkout_fields( $fields ) {
	unset($fields['billing']['billing_country']);
	unset($fields['billing']['billing_city']);
	unset($fields['billing']['billing_company']);
	unset($fields['billing']['billing_last_name']);
	unset($fields['billing']['billing_postcode']);
	unset($fields['billing']['billing_state']);
	unset($fields['billing']['billing_address_2']);
	unset($fields['billing']['billing_first_name']);
	unset($fields['billing']['billing_email']);
	unset($fields['billing']['billing_phone']);
	unset($fields['billing']['billing_address_1']);
	//Thêm Fields	
	$fields['billing']['billing_first_name'] = array(
		'label' => __('Tên', 'huyhoang'),
		'placeholder' => _x('', 'placeholder', 'huyhoang'),
		'required' => true,
		'class' => array('form-row-first'),
		'clear' => true
	);
	$fields['billing']['billing_phone'] = array(
		'label' => __('Số Di Động', 'huyhoang'),
		'placeholder' => _x('', 'placeholder', 'huyhoang'),
		'required' => true,
		'class' => array('form-row-last'),
		'clear' => true
	);
	$fields['billing']['billing_email'] = array(
		'label' => __('Địa Chỉ Email', 'huyhoang'),
		'placeholder' => _x('', 'placeholder', 'huyhoang'),
		'required' => true,
		'class' => array('form-row-wide'),
		'clear' => true
	);
	$fields['billing']['billing_address_1'] = array(
		'label' => __('Địa Chỉ Nhận Hàng', 'huyhoang'),
		'placeholder' => _x('', 'placeholder', 'huyhoang'),
		'required' => false,
		'class' => array('form-row-wide'),
		'clear' => true
	);

	return $fields;        
}
add_filter( 'login_display_language_dropdown', '__return_false' );
add_filter( 'woocommerce_admin_disabled', '__return_true' );
add_filter( 'woocommerce_marketing_menu_items', '__return_empty_array' );
add_filter( 'woocommerce_admin_features', 'disable_features' );
function disable_features( $features ) {
	$marketing = array_search('marketing', $features);
	unset( $features[$marketing] );
	return $features;
}
add_action( 'wp_print_scripts', 'wphelp_disable_password_strength_meter', 10 );
function wphelp_disable_password_strength_meter() {
	wp_dequeue_script( 'wc-password-strength-meter' );
}

Trả lời

Email của bạn sẽ không được hiển thị công khai.