Custom field on thank you page
-
Hello,
i am strugling for hours on simple task. Via function/hook i created custom field on checkout page for mobile phone.// 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 ) { $fields['billing']['shipping_phone'] = array( 'label' => __('Phone Iphone', 'woocommerce'), 'placeholder' => _x('Phone', 'placeholder', 'woocommerce'), 'required' => false, 'class' => array('form-row-wide'), 'clear' => true ); return $fields; }
now i open thankyou template and add
<? echo '<p><strong>'.__('Phone From Checkout Form').':</strong> ' . get_post_meta( $order->id, '_shipping_phone', true ) . '</p>'; ?>
But i dont get value from shipping phone ?? just get that strong text printed adn thats it.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom field on thank you page’ is closed to new replies.