plugins – Warning: urlencode() expects parameter 1 to be string, array given in callback
Question
I’m trying to filter product with ajax and when i sent data to ajax function
it’s Shows Error in output as Warning: urlencode() expects parameter 1 to be string, array given in C:\Users\Loha\Sites\wordpress.dev.cc\wp-includes\formatting.php on line 5501
this is my code:
if(!empty( $_POST['product_cat'] )){
$args['tax_query'][] = array(
'taxonomy' => 'product_cat',
'field' => 'term_id',
'terms' => $_POST['product_cat'],
);
}
0
8 months
2022-06-05T16:29:20-05:00
2022-06-05T16:29:20-05:00 0 Answers
0 views
0
Leave an answer