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::maybe_update_stock_status( WC_Product $product, string|null $stock_status )

Apply product type constraints to stock status.


Description Description


Parameters Parameters

$product

(Required) The product whose stock status will be adjusted.

$stock_status

(Required) The stock status to use for adjustment, or null if no new stock status has been supplied in the request.


Top ↑

Return Return

(WC_Product) The supplied product, or the synced product if it was a variable product.


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.