$extra Extra query args (utm_*, persona…). * @return array */ public static function link_params( $extra = array() ) { $params = array( 'store' => (string) wp_parse_url( home_url(), PHP_URL_HOST ), 'env' => function_exists( 'wp_get_environment_type' ) ? wp_get_environment_type() : 'production', 'v' => LLTXT_VERSION, 'locale' => get_locale(), ); return array_merge( $params, $extra ); } /** * Cheap published-product count for the status line (local, no scoring). * * The Agent-Readiness Score itself is deliberately NOT computed here — it is * a nuanced audit that runs on xpay.sh (see SCORE_URL), gated on the report. * * @return int */ public static function product_count() { if ( ! Lltxt_Catalog_Reader::wc_ready() ) { return 0; } $counts = wp_count_posts( 'product' ); return ( $counts && isset( $counts->publish ) ) ? (int) $counts->publish : 0; } /** * Render the tab. * * @return void */ public static function render() { $playground = add_query_arg( self::link_params( array( 'utm_source' => 'wc-plugin', 'utm_medium' => 'dashboard', 'utm_campaign' => 'ai-commerce-tab', ) ), self::PLAYGROUND_URL ); $onboarding = add_query_arg( self::link_params( array( 'persona' => 'merchant', 'utm_source' => 'wc-plugin', 'utm_medium' => 'dashboard', 'utm_campaign' => 'flagship-bridge', ) ), self::ONBOARDING_URL ); $score_url = add_query_arg( self::link_params( array( 'utm_source' => 'wc-plugin', 'utm_medium' => 'dashboard', 'utm_campaign' => 'readiness-score', ) ), self::SCORE_URL ); $bot_url = add_query_arg( self::link_params( array( 'utm_source' => 'wc-plugin', 'utm_medium' => 'dashboard', 'utm_campaign' => 'bot-traffic', ) ), self::BOT_TRAFFIC_URL ); $product_count = self::product_count(); $last = Lltxt_Refresh::last_refresh(); // Resolve the two file URLs for the status card (local, cheap). $files = array(); foreach ( Lltxt_Plugin::emitter_classes() as $class ) { $emitter = Lltxt_Plugin::make_emitter( $class ); if ( null === $emitter ) { continue; } $path = $emitter->output_path(); if ( null === $path || '' === $path ) { continue; } $files[] = array( 'label' => '/' . $path, 'url' => Lltxt_Cache::get_url( $path ), ); } ?>

✓

0 ) { echo ' · '; echo esc_html( sprintf( /* translators: %d: number of published products. */ _n( '%d product in your catalog', '%d products in your catalog', $product_count, 'agentic-commerce-llms-txt' ), $product_count ) ); } ?>

↗

—

AI shopping agent does
— in 10 seconds', 'agentic-commerce-llms-txt' ), array( 'em' => array(), 'br' => array() ) ); ?>

↗

↗

xpay✦ Commerce ·