WPIntell

Source evidence

Hide upload field using filter

Checkout Files Upload for WooCommerce · support · 2023-11-28T15:17:00+00:00

mixedsentiment
highseverity
0.88relevance
2replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

2 / 28 rows with source links

7.1% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

26 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
metikar resolved
Hi 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

Comments

2 shown
MeganSupport 2023-11-29T13:56:00+00:00

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

metikar 2023-11-29T17:33:00+00:00

Thanks