Changeset 3813840
- Timestamp:
- 11/20/2026 02:18:32 PM (less than one hour ago)
- Location:
- wsp-mcp-ai-agents-connector/trunk
- Files:
-
- 4 edited
-
includes/abilities/woocommerce.php (modified) (3 diffs)
-
includes/tools/native-tools.php (modified) (8 diffs)
-
readme.txt (modified) (3 diffs)
-
wsp-mcp-ai-agents-connector.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wsp-mcp-ai-agents-connector/trunk/includes/abilities/woocommerce.php
r3736094 r3813840 115 115 116 116 function wsp_execute_woo_create_product( $input ) { 117 $name = sanitize_text_field( wp_unslash( $input['name'] ) ); 118 $price = sanitize_text_field( wp_unslash( $input['regular_price'] ) ); 119 $desc = isset( $input['description'] ) ? wp_kses_post( wp_unslash( $input['description'] ) ) : ''; 120 $sku = isset( $input['sku'] ) ? sanitize_text_field( wp_unslash( $input['sku'] ) ) : ''; 121 $status = isset( $input['status'] ) ? sanitize_text_field( wp_unslash( $input['status'] ) ) : 'draft'; 122 $type = isset( $input['type'] ) ? sanitize_text_field( wp_unslash( $input['type'] ) ) : 'simple'; 117 $name = sanitize_text_field( wp_unslash( $input['name'] ) ); 118 $price = sanitize_text_field( wp_unslash( $input['regular_price'] ) ); 119 $desc = isset( $input['description'] ) ? wp_kses_post( wp_unslash( $input['description'] ) ) : ''; 120 $short_desc = isset( $input['short_description'] ) ? wp_kses_post( wp_unslash( $input['short_description'] ) ) : ''; 121 $sku = isset( $input['sku'] ) ? sanitize_text_field( wp_unslash( $input['sku'] ) ) : ''; 122 $status = isset( $input['status'] ) ? sanitize_text_field( wp_unslash( $input['status'] ) ) : 'draft'; 123 $type = isset( $input['type'] ) ? sanitize_text_field( wp_unslash( $input['type'] ) ) : 'simple'; 123 124 124 125 if ( 'variable' === $type ) { … … 131 132 $p->set_status( $status ); 132 133 $p->set_description( $desc ); 134 if ( '' !== $short_desc ) { 135 $p->set_short_description( $short_desc ); 136 } 133 137 134 138 if ( 'variable' !== $type ) { … … 262 266 $p->set_description( $value ); 263 267 $updated['description'] = $value; 268 } 269 270 if ( isset( $input['short_description'] ) ) { 271 $value = wp_kses_post( wp_unslash( $input['short_description'] ) ); 272 $p->set_short_description( $value ); 273 $updated['short_description'] = $value; 264 274 } 265 275 -
wsp-mcp-ai-agents-connector/trunk/includes/tools/native-tools.php
r3809511 r3813840 1208 1208 'description' => 'Create a new simple or variable product in the store.', 1209 1209 'inputSchema' => array( 'type' => 'object', 'required' => array( 'name', 'regular_price' ), 'properties' => array( 1210 'name' => array( 'type' => 'string', 'description' => 'Product name.' ), 1211 'regular_price' => array( 'type' => 'string', 'description' => 'Regular price.' ), 1212 'sale_price' => array( 'type' => 'string', 'description' => 'Sale/discount price (optional).' ), 1213 'description' => array( 'type' => 'string', 'description' => 'Product description.' ), 1214 'sku' => array( 'type' => 'string', 'description' => 'Unique SKU.' ), 1215 'status' => array( 'type' => 'string', 'description' => 'publish | draft. Default draft.' ), 1210 'name' => array( 'type' => 'string', 'description' => 'Product name.' ), 1211 'regular_price' => array( 'type' => 'string', 'description' => 'Regular price.' ), 1212 'sale_price' => array( 'type' => 'string', 'description' => 'Sale/discount price (optional).' ), 1213 'description' => array( 'type' => 'string', 'description' => 'Full product description (long description).' ), 1214 'short_description' => array( 'type' => 'string', 'description' => 'Product short description shown near the price.' ), 1215 'sku' => array( 'type' => 'string', 'description' => 'Unique SKU.' ), 1216 'status' => array( 'type' => 'string', 'description' => 'publish | draft. Default draft.' ), 1216 1217 'type' => array( 'type' => 'string', 'description' => 'simple | variable. Default simple.' ), 1217 1218 'image_url' => array( 'type' => 'string', 'description' => 'Direct image URL to download and set as product featured image.' ), … … 1256 1257 'description' => 'Update an existing product details.', 1257 1258 'inputSchema' => array( 'type' => 'object', 'required' => array( 'id' ), 'properties' => array( 1258 'id' => array( 'type' => 'integer', 'description' => 'The ID of the product to update.' ), 1259 'name' => array( 'type' => 'string', 'description' => 'Product name.' ), 1260 'regular_price' => array( 'type' => 'string', 'description' => 'Regular price.' ), 1261 'sale_price' => array( 'type' => 'string', 'description' => 'Sale/discount price.' ), 1262 'description' => array( 'type' => 'string', 'description' => 'Product description.' ), 1263 'sku' => array( 'type' => 'string', 'description' => 'Unique SKU.' ), 1259 'id' => array( 'type' => 'integer', 'description' => 'The ID of the product to update.' ), 1260 'name' => array( 'type' => 'string', 'description' => 'Product name.' ), 1261 'regular_price' => array( 'type' => 'string', 'description' => 'Regular price.' ), 1262 'sale_price' => array( 'type' => 'string', 'description' => 'Sale/discount price.' ), 1263 'description' => array( 'type' => 'string', 'description' => 'Full product description (long description).' ), 1264 'short_description' => array( 'type' => 'string', 'description' => 'Product short description shown near the price.' ), 1265 'sku' => array( 'type' => 'string', 'description' => 'Unique SKU.' ), 1264 1266 'stock_qty' => array( 'type' => 'integer', 'description' => 'Manage stock quantity.' ), 1265 1267 'categories' => array( 'type' => 'array', 'items' => array( 'type' => 'integer' ), 'description' => 'Product category term IDs (see wsp_woo_get_product_categories). Replaces existing.' ), … … 1270 1272 ) ), 1271 1273 'callback' => 'wsp_execute_woo_update_product', 1272 'capability' => ' edit_posts',1274 'capability' => 'manage_woocommerce', 1273 1275 'enable_key' => 'wsp/woo-update-product', 1274 1276 ) ); … … 1280 1282 ) ), 1281 1283 'callback' => 'wsp_execute_woo_list_orders', 1282 'capability' => ' edit_posts',1284 'capability' => 'manage_woocommerce', 1283 1285 'enable_key' => 'wsp/woo-list-orders', 1284 1286 ) ); … … 1290 1292 ) ), 1291 1293 'callback' => 'wsp_execute_woo_update_order_status', 1292 'capability' => ' edit_posts',1294 'capability' => 'manage_woocommerce', 1293 1295 'enable_key' => 'wsp/woo-update-order-status', 1294 1296 ) ); … … 1333 1335 ) ), 1334 1336 'callback' => 'wsp_execute_woo_create_order_note', 1335 'capability' => ' edit_posts',1337 'capability' => 'manage_woocommerce', 1336 1338 'enable_key' => 'wsp/woo-create-order-note', 1337 1339 ) ); … … 1351 1353 ) ), 1352 1354 'callback' => 'wsp_execute_woo_report_sales', 1353 'capability' => ' edit_posts',1355 'capability' => 'manage_woocommerce', 1354 1356 'enable_key' => 'wsp/woo-report-sales', 1355 1357 ) ); … … 1371 1373 ) ), 1372 1374 'callback' => 'wsp_execute_woo_moderate_review', 1373 'capability' => ' edit_posts',1375 'capability' => 'manage_woocommerce', 1374 1376 'enable_key' => 'wsp/woo-moderate-review', 1375 1377 ) ); -
wsp-mcp-ai-agents-connector/trunk/readme.txt
r3809511 r3813840 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 2.9.97 Stable tag: 3.0.0 8 8 License: GPL-2.0-or-later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 128 128 == Changelog == 129 129 130 = 3.0.0 = 131 * Security: six WooCommerce tools (update product, list orders, update order status, add order note, sales report, moderate reviews) now require the manage_woocommerce capability instead of edit_posts, so Contributors can no longer use them. Only Shop Managers and Administrators can. 132 * New: WooCommerce create and update product tools now support a short description. 133 130 134 = 2.9.9 = 131 135 * New: Enable All / Disable All button on MCP > Settings (asks for confirmation before enabling everything). … … 282 286 == Upgrade Notice == 283 287 288 = 3.0.0 = 289 Security update: WooCommerce order, sales and product-update tools now require the manage_woocommerce capability. Update recommended. 290 284 291 = 2.9.9 = 285 292 Adds SEO meta tools for WooCommerce products and taxonomy terms (Yoast, Rank Math) and an Enable All / Disable All button on the Settings page. -
wsp-mcp-ai-agents-connector/trunk/wsp-mcp-ai-agents-connector.php
r3809511 r3813840 3 3 * Plugin Name: WSP MCP - Free MCP Plugin for WordPress: Connect Claude, ChatGPT & AI Agents 4 4 * Description: Connect Claude, ChatGPT, Cursor & any AI agent to WordPress. Manage posts, pages, media, SEO, WooCommerce, Elementor & more by chat — 200+ tools, you choose which are on. Free. 5 * Version: 2.9.95 * Version: 3.0.0 6 6 * Requires at least: 6.9 7 7 * Requires PHP: 7.4 … … 15 15 if ( ! defined( 'ABSPATH' ) ) exit; 16 16 17 define( 'WSP_MCP_VERSION', ' 2.9.9' );17 define( 'WSP_MCP_VERSION', '3.0.0' ); 18 18 define( 'WSP_MCP_OPTION', 'wsp_mcp_abilities' ); 19 19 define( 'WSP_MCP_DIR', plugin_dir_path( __FILE__ ) );
Note:
See TracChangeset
for help on using the changeset viewer.