Helper; if ( $Helper->is_hidden( $data ) || ! $Helper->admin_view( $data ) ) { return ''; } $label = $data['label'] ?? __( 'Radio', 'adirectory' ); $fieldid = $data['fieldid']; $name = "_radio_{$fieldid}"; $placeholder = $data['placeholder'] ?? ''; $value = ! empty( get_post_meta( $post_id, $name, true ) ) ? get_post_meta( $post_id, $name, true ) : ''; $options = $data['options'] ?? []; // Check pricing restrictions for both creating and editing if ( $ispricing ) { // Get order ID: from post meta when editing, from URL when creating. if ( isset( $_GET['postid'] ) ) { $order_id = get_post_meta( absint( $_GET['postid'] ), 'adqs_pricing_order_no', true ); } else { $order_id = $_GET['adqs_order'] ?? 0; } $order_id = absint( $order_id ); if ( $order_id > 0 ) { if ( $pricing_active === 'self' ) { $pricing = adp_get_query_order( $order_id, 'pricing_id' ); $pricing_id = isset( $pricing->pricing_id ) ? $pricing->pricing_id : 0; $exist_field = $pricing_id ? adp_get_query_pricing_meta( $pricing_id, 'lm' . $name, true ) : 'no'; if ( $exist_field !== 'yes' ) { return; } } elseif ( $pricing_active === 'wc' ) { $pricing = function_exists( 'adp_wc_get_query_order' ) ? adp_wc_get_query_order( $order_id ) : null; $product_id = $pricing->pricing_id ?? 0; $exist_field = function_exists( 'adp_wc_get_meta' ) && $product_id ? adp_wc_get_meta( $product_id, 'lm' . $name ) : 'no'; if ( $exist_field !== 'yes' ) { return; } } } } ?>

>