Documentation
Ops Pro
Developer Reference

Developer Reference


Constants

ConstantValueDescription
WCOPS_PRO_VERSION1.0.0Plugin version
WCOPS_PRO_PLUGIN_FILE__FILE__Main plugin file
WCOPS_PRO_PLUGIN_DIRplugin_dir_path()Plugin directory
WCOPS_PRO_PLUGIN_URLplugin_dir_url()Plugin URL
WCOPS_PRO_REST_NAMESPACEwindcodex-ops/v1REST namespace (same as the free plugin)
WCOPS_PRO_REST_ROUTE/mcpMCP route
WCOPS_PRO_LICENSE_OPTIONwcops_pro_license_keyLicense key option name
WCOPS_PRO_LICENSE_STATUS_OPTIONwcops_pro_license_statusLicense status option name

REST Routes

RouteMethodDescription
/wp-json/windcodex-ops/v1/mcpPOSTMCP JSON-RPC endpoint (Bearer token)
/wp-json/windcodex-ops/v1/oauth/registerPOSTDynamic client registration
/wp-json/windcodex-ops/v1/oauth/tokenPOSTToken exchange and refresh
/wp-json/windcodex-ops/v1/compare-summaryGETShared-key summary used by wp_compare_with_staging
/wcops-oauth/authorizeGET/POSTConsent screen (rewrite rule)

Options

OptionDescription
wcops_settingsAll settings (shared with Ops)
wcops_pro_license_keyLicense key
wcops_pro_license_statusCached license status

Notable keys in wcops_settings: tool_groups, requests_per_minute_limit (10-600, default 120), undo_window_hours (72, 96, or 168), hubspot_api_key, allow_dynamic_registration, delete_data_on_uninstall.

Filters

FilterArgumentsDescription
wcops_pro_ability_capability$capability, $tool_name, $destructiveChange the capability required to run a tool through the Abilities API

Default capabilities: manage_woocommerce for woo_* tools; edit_posts / delete_posts (destructive) for content-style tools; manage_options for everything else (users, security, site health, advanced admin, memory).

add_filter( 'wcops_pro_ability_capability', function ( $capability, $tool_name, $destructive ) {
    if ( 0 === strpos( $tool_name, 'woo_' ) && ! $destructive ) {
        return 'edit_shop_orders';
    }
    return $capability;
}, 10, 3 );

WordPress Abilities API

On WordPress 6.9+, each tool is registered as an ability under the windcodex-ops category, named windcodex-ops/<tool-name-with-dashes>.

The MCP endpoint and Abilities API are the supported integration surfaces. Internal PHP classes are not a public API.