Woocommerce Kategorilere ait ürünlerin id lerini çekmek
2
●46
- 06-04-2022, 01:11:38Üyeliği durduruldu
- 06-04-2022, 01:45:06functionget_products_from_category_by_ID( $category ) {geceyarisi adlı üyeden alıntı: mesajı görüntüle
$products = newWP_Query( array('post_type' => 'product','post_status' => 'publish','fields' => 'ids','tax_query' => array('relation' => 'AND',array('taxonomy' => 'product_cat','field' => 'term_id','terms' => $category, ) ),
) );return$products->posts;}
get_products_from_category_by_ID( #kategoriid# );
bunun ile çözdüm teşekkür ederim hocam sağolun.