Woocommerce Product Registration outside the Wordpress dashboard

Asked

Viewed 1,127 times

0

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

In addition, the site will rely on sellers where they can register products in their names (or their stores) but for the realization of the registration of products can not be made through the administrative panel of Wordpress.

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

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

Is there a plugin? Some shortcode? Or I’ll have to do it in the nail?

If you have to do this in the nail, someone knows a solution of what is the registration behavior of Woocommerce in the database?

Thank you!

  • The Woocommerce has a API. I believe that if you really can’t create roles users with custom permissions for them to enter the panel and register, you should start there.

2 answers

0

You can try to integrate with Pmpro or another user level control plugin. Search 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 authorizations. "if menu" is one of them, but it’s very simple.

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

From there you structure the site as needed.

If you can not find these plugins let me know that tomorrow I put the links to you here (I write from cel).

I hope I’ve helped! :)

0

Woocomerce has a REST API that can handle all functions and attributes of the entire tool.
Below is how to register a PHP product 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 the documentation: https://woocommerce.github.io/woocommerce-rest-api-docs/? php#create-a-product

Browser other questions tagged

You are not signed in. Login or sign up in order to post.