diff --git a/templates/products/edit-product-single.php b/templates/products/edit-product-single.php index 049cd14de0..c5e0a6d065 100755 --- a/templates/products/edit-product-single.php +++ b/templates/products/edit-product-single.php @@ -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;