Get selected variation ID for php query
-
Hi there, I’m trying to query an information (lead time) from the selected product variation. I understand that the variation ID can be retrieved only with JS query which works in the below code. My question is how I can include var_id into the php query wclt_get_lead_time( $variation_ID);. Is this possible / can someone help me?
Thanks, Frank
global $product; if ( $product->is_type( 'variable' ) ) { wc_enqueue_js( " $( 'input.variation_id' ).change( function(){ if( '' != $(this).val() ) { var var_id = $(this).val(); alert('You just selected variation #' + var_id); } }); " ); } $lead_time = wclt_get_lead_time( $variation_ID);
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Get selected variation ID for php query’ is closed to new replies.