Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

WC_Admin_Post_Types::set_new_price( WC_Product $product, string $price_type )

Set the new regular or sale price if requested.

Description Description

Parameters Parameters


(Required) The product to set the new price for.


(Required) 'regular' or 'sale'.

Top ↑

Return Return

(bool) true if a new price has been set, false otherwise.

Top ↑

Source Source

File: includes/admin/class-wc-admin-post-types.php

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.