Skip to content

Commit

Permalink
fix: Product Creation support for vendor staff
Browse files Browse the repository at this point in the history
  • Loading branch information
shohag121 committed Nov 20, 2023
1 parent bf3e013 commit 452fd5a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion templates/products/edit-product-single.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@

$product->set_name( $post_title );
$product->set_status( $post_status );
$post_id = $product->save();
$post_id = $product->save();
wp_update_post(
[
'ID' => $post_id,
'post_author' => dokan_get_current_user_id(),
]
);

$post = get_post( $post_id );
$from_shortcode = true;
$new_product = true;
Expand Down

0 comments on commit 452fd5a

Please sign in to comment.