Automattic\WooCommerce\Internal\ProductFeed\Mapping
UcpProductMapper::record_truncation
Note that a product's variant list came back short, for the caller to report.
Method of the class: UcpProductMapper{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->record_truncation( $item, $returned, $total ): void;
- $item(array) (required)
- Store API item response of the variable product.
- $returned(int) (required)
- Number of variants actually built.
- $total(int) (required)
- Number of variants there were to build.
UcpProductMapper::record_truncation() UcpProductMapper::record truncation code WC 11.3.0
private function record_truncation( array $item, int $returned, int $total ): void {
if ( $returned >= $total ) {
return;
}
$this->truncations[ (int) $item['id'] ] = array(
'title' => (string) $item['name'],
'returned' => $returned,
'total' => $total,
);
}