Conversation
supportHi I am trying to hide the upload field by using woocommerce_checkout_fields filter then unset ting the field unset($fields[‘alg_checkout_files_upload’] according to a certain conditions ex add_filter( 'woocommerce_checkout_fields', 'hide_prefilled_fields',99999 ); function hide_prefilled_fields( $fields ) { $user_id = get_current_user_id(); $orders = wc_get_orders( array( 'customer' => $user_id, 'status' => array( 'wc-completed' ), 'date_created' => '>=' . strtotime('-2 months') ) ); if ( ! empty( $orders ) ) { foreach ( $orders as $order ) { $user_registered_name = $order->get_meta('_user_registered_name'); if ( ! empty( $user_registered_name ) ) { unset($fields['alg_checkout_files_upload']); } } } return $fields; } Is that possible to hide the upload field using fields filter ? This topic was modified 2 years, 6 months ago by metikar .
Hi there, Please note that for queries like this a support ticket needs to be logged via our website here https://wpwham.com/support so that we can assist you further. Thanks in advance, Megan WP WHam Support
Thanks
Hi there, Please note that for queries like this a support ticket needs to be logged via our website here https://wpwham.com/support so that we can assist you further. Thanks in advance, Megan WP WHam Support
Thanks