Automattic\WooCommerce\Blocks\AIContent
PatternsHelper::get_patterns_ai_data_post()
Returns the post that has the generated data by the AI for the patterns.
Method of the class: PatternsHelper{}
No Hooks.
Return
\WP_Post|null
.
Usage
$result = PatternsHelper::get_patterns_ai_data_post();
PatternsHelper::get_patterns_ai_data_post() PatternsHelper::get patterns ai data post code WC 9.8.1
public static function get_patterns_ai_data_post() { $posts = get_posts( array( 'post_type' => 'patterns_ai_data', 'posts_per_page' => 1, 'cache_results' => true, ) ); return $posts[0] ?? null; }