WC_Post_Data::sync_product_stock_statuspublic staticWC 1.0

Deprecated since 3.3. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.

When setting stock level, ensure the stock status is kept in sync.

Method of the class: WC_Post_Data{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = WC_Post_Data::sync_product_stock_status( $meta_id, $object_id, $meta_key, $meta_value );
$meta_id(int) (required)
Meta ID.
$object_id(int) (required)
Object ID.
$meta_key(string) (required)
Meta key.
$meta_value(mixed) (required)
Meta value.

Changelog

Deprecated since 3.3

WC_Post_Data::sync_product_stock_status() code WC 10.5.0

public static function sync_product_stock_status( $meta_id, $object_id, $meta_key, $meta_value ) {}