Woocommerce API & Prices by User Role

Modified on Tue, 23 Jan 2024 at 08:21 PM

To use woocommerce API please read WooCommerce native documentation

We just provide some function, which you can use in WooCommerce API.
For the moment, these are such function as:

Update prices for all roles

$prices = array(
    'group1' => 100
);

update_prices_by_roles($product_id, $prices);

Get all prices for product

get_product_prices($product_id);

Get user price for product

get_price_by_user_id($product_id, $user_id);

If you want any other function to be added we can discuss the custom development possibility please email us.




Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article