Automattic\WooCommerce\Admin\API\AI
StoreInfo::get_response()
Update the store title powered by AI.
Method of the class: StoreInfo{}
No Hooks.
Return
WP_Error|WP_REST_Response
.
Usage
$StoreInfo = new StoreInfo(); $StoreInfo->get_response();
StoreInfo::get_response() StoreInfo::get response code WC 9.4.2
public function get_response() { $product_updater = new UpdateProducts(); $patterns = PatternsHelper::get_patterns_ai_data_post(); $products = $product_updater->fetch_product_ids( 'dummy' ); if ( empty( $products ) && ! isset( $patterns ) ) { return rest_ensure_response( array( 'is_ai_generated' => false, ) ); } return rest_ensure_response( array( 'is_ai_generated' => true, ) ); }