Automattic\WooCommerce\Admin\API
Products::get_object()
Hang onto last order date since it will get removed by wc_get_product().
Метод класса: Products{}
Хуков нет.
Возвращает
WC_Data
.
Использование
$Products = new Products(); $Products->get_object( $object_data );
- $object_data(stdClass) (обязательный)
- Single row from query results.
Код Products::get_object() Products::get object WC 9.4.2
public function get_object( $object_data ) { if ( isset( $object_data->last_order_date ) ) { $this->last_order_dates[ $object_data->ID ] = $object_data->last_order_date; } return parent::get_object( $object_data ); }