Woocommerce Product Registration outside the Wordpress panel

0

I'm developing a Wordpress site where I'm using the Woocommerce plugin for product administration, etc.

In addition, the site will have vendors where they can register products in their names (or their stores) but for the registration of products can not be done through the administrative panel of Wordpress. >

I need to present my client with a way to register on some other page, for example, using some plugin or I do not know what.

I searched and did not find a way to do this ... use the woocommerce product registration form that can be accessed outside the wordpress admin, of course the "seller" has to be logged in so that access to a certain page product registration is enabled.

Is there a plugin? Any shortcode? Or do I have to do it on my nail?

If you have to do this on the nail, does anyone know a solution to how the Woocommerce registration behavior in the database is?

Thank you!

    
asked by anonymous 10.03.2016 / 21:50

2 answers

0

You can try integrating with PMPro or another user-level control plugin. Look for "Membership" plugins in WP, you will find some.

You can use plugins that control which menus appear to those who are logged in with defined permissions. The "if menu" is one of them, but it's very simple.

Finally you can use the Theme My Login TML to make a login page according to your theme.

From there you structure the site as you need it.

If you can not find these plugins, let me know that tomorrow I'll put the links to you here.

I hope I have helped! :)

    
11.03.2016 / 06:03
0

Woocomerce has a REST API that can handle all the functions and attributes of the entire tool. Below is how to register a product in PHP using the woocomerce REST API.

<?php
$data = [
    'name' => 'Premium Quality',
    'type' => 'simple',
    'regular_price' => '21.99',
    'description' => 'Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.',
    'short_description' => 'Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.',
    'categories' => [
        [
            'id' => 9
        ],
        [
            'id' => 14
        ]
    ],
    'images' => [
        [
            'src' => 'http://demo.woothemes.com/woocommerce/wp-content/uploads/sites/56/2013/06/T_2_front.jpg',
            'position' => 0
        ],
        [
            'src' => 'http://demo.woothemes.com/woocommerce/wp-content/uploads/sites/56/2013/06/T_2_back.jpg',
            'position' => 1
        ]
    ]
];

print_r($woocommerce->post('products', $data));
?>

Link to documentation: link

    
03.08.2018 / 21:22