I have a one simple question - is it real to create function which allows to users list their own products on my website, with Word Press and WooCommerce plugin ? Can you share solutions if is ? Thank you !
CodePudding user response:
$args = get_posts( [
'post_type' => 'product',
'post_status' => [ 'publish', 'pending' ],
'author' => get_current_user_id(),
'posts_per_page' => 50,
'page' => 1,
'offset' => 0,
'orderby' => 'post_date',
'order' => 'desc',
] );