Hej Linda
Jeg bruger også Woocommerce på designgrotten.dk Og jeg er superglad for det.
Hvis du gerne vil minimere antallet af felter i din checkout, så kan du smide dette ind i din functions.php. Det vil sørge for, at du kun får vist fornavn, efternavn og mail:
add_filter( 'woocommerce_billing_fields', 'woo_filter_billing_fields', 10 );
function woo_filter_billing_fields( ) {
array(
'billing_first_name' => array(
'name' =>'billing_first_name',
'label' => __('First Name', 'woothemes'),
'placeholder' => __('First Name', 'woothemes'),
'required' => true,
'class' => array('form-row-first')
),
'billing_last_name' => array(
'label' => __('Last Name', 'woothemes'),
'placeholder' => __('Last Name', 'woothemes'),
'required' => true,
'class' => array('form-row-last')
),
'billing_company' => array(
'label' => __('Company', 'woothemes'),
'placeholder' => __('Company', 'woothemes')
),
'billing_address_1' => array(
'label' => __('Address', 'woothemes'),
'placeholder' => __('Address 1', 'woothemes'),
'required' => true,
'class' => array('form-row-first')
),
'billing_address_2' => array(
'label' => __('Address 2', 'woothemes'),
'placeholder' => __('Address 2', 'woothemes'),
'class' => array('form-row-last'),
'label_class' => array('hidden')
),
'billing_city' => array(
'label' => __('City', 'woothemes'),
'placeholder' => __('City', 'woothemes'),
'required' => true,
'class' => array('form-row-first')
),
'billing_postcode' => array(
'label' => __('Postcode', 'woothemes'),
'placeholder' => __('Postcode', 'woothemes'),
'required' => true,
'class' => array('form-row-last update_totals_on_change')
),
'billing_country' => array(
'type' => 'country',
'label' => __('Country', 'woothemes'),
'required' => true,
'class' => array('form-row-first update_totals_on_change'),
'rel' => 'billing_state'
),
'billing_state' => array(
'type' => 'state',
'name' =>'billing_state',
'label' => __('State/County', 'woothemes'),
'required' => true,
'class' => array('form-row-last update_totals_on_change'),
'rel' => 'billing_country'
),
'billing_email' => array(
'label' => __('Email Address', 'woothemes'),
'placeholder' => __('you@yourdomain.com', 'woothemes'),
'required' => true,
'class' => array('form-row-first')
),
'billing_phone' => array(
'label' => __('Phone', 'woothemes'),
'placeholder' => __('Phone number', 'woothemes'),
'required' => true,
'class' => array('form-row-last')
)
);
return array(
'billing_first_name' => array(
'name' =>'billing_first_name',
'label' => __('First Name', 'woothemes'),
'placeholder' => __('First Name', 'woothemes'),
'required' => true,
'class' => array('form-row-first')
),
'billing_last_name' => array(
'label' => __('Last Name', 'woothemes'),
'placeholder' => __('Last Name', 'woothemes'),
'required' => true,
'class' => array('form-row-last')
),
'billing_email' => array(
'label' => __('Email Address', 'woothemes'),
'placeholder' => __('you@yourdomain.com', 'woothemes'),
'required' => true,
'class' => array('form-row-first')
)
);
}