0
我想檢索一個子類別中的所有產品。這是我的代碼:WooCommerce-mysql - 獲取產品的類別列表
SELECT * from `wp_term_relationships` where term_taxonomy_id=$subcatId and
object_id in(select ID from `wp_posts` where `post_type`='product' and post_status='publish' and ID=wp_term_relationships.object_id)
的問題是,約20級的產品驗證碼回報,但是當我去到該類別的網站,它返回約40個產品。
你能幫我嗎?我需要一個代碼來返回一個類別內的產品列表。