add woo commerce fields
-
i want to add WooCommerce custom fields edit functions.php
i add this codeadd_action('woocommerce_after_order_notes', 'custom_checkout_field');
function custom_checkout_field($checkout) {
echo '<div id="custom_checkout_field"><h3>' . __('Custom Field') . '</h3>';
woocommerce_form_field('custom_field_name', array(
'type' => 'text',
'class' => array('custom-field-class form-row-wide'),
'label' => __('Enter Custom Data'),
'placeholder' => __('Custom placeholder'),
'required' => false,
), $checkout->get_value('custom_field_name'));
echo '</div>';
}but not show in woo coomrece checkout page
any one help plzzz
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.