Title: Register a vendor
Last modified: December 18, 2019

---

# Register a vendor

 *  Resolved [misstest](https://wordpress.org/support/users/misstest/)
 * (@misstest)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/register-a-vendor/)
 * is it posible to register a vendor and have already a product posted?
 * For example= i register a vendor. when the vendor logs in, it has already published
   a product.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [WC Lovers](https://wordpress.org/support/users/wclovers/)
 * (@wclovers)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/register-a-vendor/#post-12257167)
 * Hi,
 * Yeah possible.
 * But what will be content for that product? Title, description, price etc …
 * Thank You
 *  Thread Starter [misstest](https://wordpress.org/support/users/misstest/)
 * (@misstest)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/register-a-vendor/#post-12258180)
 * It would be like this:
    Title: Makeup Description: Product used to decorate or
   fix a person’s facial or body features; This consists of various elements with
   specific functions for each part. Price: 10 Short description: Coming soon
    -  This reply was modified 6 years, 4 months ago by [misstest](https://wordpress.org/support/users/misstest/).
 *  Plugin Author [WC Lovers](https://wordpress.org/support/users/wclovers/)
 * (@wclovers)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/register-a-vendor/#post-12261831)
 * HI,
 * Please add this code to your site for the purpose-
 *     ```
       add_action( 'wcfmmp_new_store_created', function( $member_id, $wcfmmp_settings ) {
       	$product_args = array(
       												'post_title'   => 'Makeup',
       												'post_status'  => 'publish',
       												'post_type'    => 'product',
       												'post_excerpt' => 'Coming soon!',
       												'post_content' => 'Product used to decorate or fix a person’s facial or body features; This consists of various elements with specific functions for each part.',
       												'post_author'  => $member_id,
       												'post_name'    => sanitize_title('Makeup')
       											);
       	$new_product_id = wp_insert_post( $product_args, true );
       	update_post_meta( $new_product_id, '_wcfm_product_author', $member_id );
   
       	// Set Product Type
       	wp_set_object_terms( $new_product_id, 'simple', 'product_type' );
   
       	// Set Price
       	update_post_meta( $new_product_id, '_regular_price', '10' );
       	update_post_meta( $new_product_id, '_price', '10' );
       }, 50, 2 );
       ```
   
 * Add this code to your child theme’s functions.php
    In case you do not have child
   theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/
 * Thank You
 *  Thread Starter [misstest](https://wordpress.org/support/users/misstest/)
 * (@misstest)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/register-a-vendor/#post-12264671)
 * Thank you so much!!!
 * There is a way to also add the image?
 * _P.S: you guys deserve a 10 star!_
 *  Plugin Author [WC Lovers](https://wordpress.org/support/users/wclovers/)
 * (@wclovers)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/register-a-vendor/#post-12349478)
 * Sure, hope you want to associate “Featured Image” for this product?
 * You have to know me that image’s attachment id.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Register a vendor’ is closed to new replies.

 * ![](https://ps.w.org/wc-multivendor-marketplace/assets/icon-256x256.gif?rev=2611991)
 * [WCFM Marketplace - Multivendor Marketplace for WooCommerce](https://wordpress.org/plugins/wc-multivendor-marketplace/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wc-multivendor-marketplace/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wc-multivendor-marketplace/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-multivendor-marketplace/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-multivendor-marketplace/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-multivendor-marketplace/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [WC Lovers](https://wordpress.org/support/users/wclovers/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/register-a-vendor/#post-12349478)
 * Status: resolved