WooCommerce Integration Guide

Optimize WooCommerce for AI Agents

Learn how to customize WordPress filters, configure schema markup on product catalogs, and upload the standard llms.txt file.

1 Filter WordPress robots.txt Output

Rather than editing static files, use the WordPress robots_txt filter in your theme's functions.php file to whitelist AI shopping bots:

add_filter( 'robots_txt', 'pointnxt_customize_robots_for_ai', 100, 2 ); function pointnxt_customize_robots_for_ai( $output, $public ) { $output .= "\n# Allow AI Agents to index shop products\n"; $output .= "User-agent: GPTBot\n"; $output .= "Allow: /product/*\n"; $output .= "User-agent: PerplexityBot\n"; $output .= "Allow: /product/*\n"; $output .= "User-agent: ClaudeBot\n"; $output .= "Allow: /product/*\n"; return $output; }

2 Standardize WooCommerce Product Schema

Many WooCommerce themes output incomplete product variant schema. Inject structural JSON-LD metadata fields for variations by adding the following snippet:

add_action( 'wp_head', 'pointnxt_inject_wc_variant_schema' ); function pointnxt_inject_wc_variant_schema() { if ( is_product() ) { global $product; // Construct and output dynamic JSON-LD Product schema with price and stock availability } }

3 Upload llms.txt to the WordPress root directory

Generate your file via the llms.txt Generator. Using FTP or your hosting file manager, place the saved llms.txt file directly in the public root folder (e.g., /public_html/llms.txt) so it's accessible at yourdomain.com/llms.txt.

4 Leverage PointNXT WooCommerce API

Connect PointNXT via standard WooCommerce REST API key generation. PointNXT handles stock variations and feeds them directly to AI bots, removing discrepancies.

Connect WooCommerce to PointNXT