Automattic\WooCommerce\Internal\Abilities\Domain
ProductCreate::prepare_response
The ability output for the saved product.
Method of the class: ProductCreate{}
No Hooks.
Returns
array.
Usage
$ProductCreate = new ProductCreate(); $ProductCreate->prepare_response( $subject ): array;
- $subject(WC_Product) (required)
- Saved product.
ProductCreate::prepare_response() ProductCreate::prepare response code WC 11.3.0
public function prepare_response( $subject ): array {
return array(
'product' => self::format_product_for_response( $subject ),
);
}