is_type( 'variation' ) ) { return __( 'This product is a variation. Use the parent product instead.', 'ai-product-tools' ); } if ( ! in_array( $product->get_status(), self::ALLOWED_STATUSES, true ) ) { return __( 'This product\'s status does not support AI generation.', 'ai-product-tools' ); } return null; } }