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.

Метод класса: UpdateProducts{}

Хуков нет.

Возвращает

false|Разное.

Использование

$UpdateProducts = new UpdateProducts();
$UpdateProducts->get_hash_for_ai_modified_product( $product );
$product(\WC_Product) (обязательный)
The product.

Код UpdateProducts::get_hash_for_ai_modified_product() WC 9.4.2

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 );
}