Automattic\WooCommerce\Blocks\AIContent

UpdateProducts::get_hash_for_ai_modified_product()publicWC 1.0

Return the hash for a product that had its content AI-generated.

Method of the class: UpdateProducts{}

No Hooks.

Return

false|Mixed.

Usage

$UpdateProducts = new UpdateProducts();
$UpdateProducts->get_hash_for_ai_modified_product( $product );
$product(\WC_Product) (required)
The product.

UpdateProducts::get_hash_for_ai_modified_product() code WC 9.8.1

public function get_hash_for_ai_modified_product( $product ) {
	if ( ! $product instanceof \WC_Product ) {
		return false;
	}

	return get_post_meta( $product->get_id(), '_ai_generated_content', true );
}