Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Shipping phone at checkout page
- This topic has 3 replies, 2 voices, and was last updated 4 years, 5 months ago by HC.
Viewing 3 reply threads
- AuthorPosts
- May 30, 2020 at 8:47 am #136681
- June 1, 2020 at 10:24 pm #137398AvinabaMember
This has to be added from WooCommerce’s side, thus you can add the field from their settings
- June 2, 2020 at 9:06 am #137551HCParticipant
Got this code from WC,
// 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['shipping']['shipping_phone'] = array( 'label' => __('Phone', 'woocommerce'), 'placeholder' => _x('Phone', 'placeholder', 'woocommerce'), 'required' => true, 'class' => array('form-row-wide'), 'clear' => true ); return $fields; } /** * Display field value on the order edit page */ add_action( 'woocommerce_admin_order_data_after_shipping_address', 'my_custom_checkout_field_display_admin_order_meta', 10, 1 ); function my_custom_checkout_field_display_admin_order_meta($order){ echo '<p><strong>'.__('Phone From Checkout Form').':</strong> ' . get_post_meta( $order->get_id(), '_shipping_phone', true ) . '</p>'; }
It works perfectly at WC, but not showing out for vendors at WCFM> Order details.
- June 10, 2020 at 9:42 am #140130HCParticipant
Anyone have any idea on how to show shipping phone for vendors at Order details??
- AuthorPosts
Viewing 3 reply threads
- You must be logged in to reply to this topic.