Plugin Directory

Changeset 3813840


Ignore:
Timestamp:
11/20/2026 02:18:32 PM (less than one hour ago)
Author:
bilalnaseer
Message:

Release 3.0.0

Location:
wsp-mcp-ai-agents-connector/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wsp-mcp-ai-agents-connector/trunk/includes/abilities/woocommerce.php

    r3736094 r3813840  
    115115
    116116function 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';
    123124
    124125    if ( 'variable' === $type ) {
    … …  
    131132    $p->set_status( $status );
    132133    $p->set_description( $desc );
     134    if ( '' !== $short_desc ) {
     135        $p->set_short_description( $short_desc );
     136    }
    133137
    134138    if ( 'variable' !== $type ) {
    … …  
    262266        $p->set_description( $value );
    263267        $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;
    264274    }
    265275
  • wsp-mcp-ai-agents-connector/trunk/includes/tools/native-tools.php

    r3809511 r3813840  
    12081208                        'description' => 'Create a new simple or variable product in the store.',
    12091209                        '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.' ),
    12161217                                'type'          => array( 'type' => 'string', 'description' => 'simple | variable. Default simple.' ),
    12171218                                'image_url'     => array( 'type' => 'string', 'description' => 'Direct image URL to download and set as product featured image.' ),
    … …  
    12561257                        'description' => 'Update an existing product details.',
    12571258                        '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.' ),
    12641266                                'stock_qty'     => array( 'type' => 'integer', 'description' => 'Manage stock quantity.' ),
    12651267                                'categories'    => array( 'type' => 'array', 'items' => array( 'type' => 'integer' ), 'description' => 'Product category term IDs (see wsp_woo_get_product_categories). Replaces existing.' ),
    … …  
    12701272                        ) ),
    12711273                        'callback'    => 'wsp_execute_woo_update_product',
    1272                         'capability'  => 'edit_posts',
     1274                        'capability'  => 'manage_woocommerce',
    12731275                        'enable_key'  => 'wsp/woo-update-product',
    12741276                ) );
    … …  
    12801282                        ) ),
    12811283                        'callback'    => 'wsp_execute_woo_list_orders',
    1282                         'capability'  => 'edit_posts',
     1284                        'capability'  => 'manage_woocommerce',
    12831285                        'enable_key'  => 'wsp/woo-list-orders',
    12841286                ) );
    … …  
    12901292                        ) ),
    12911293                        'callback'    => 'wsp_execute_woo_update_order_status',
    1292                         'capability'  => 'edit_posts',
     1294                        'capability'  => 'manage_woocommerce',
    12931295                        'enable_key'  => 'wsp/woo-update-order-status',
    12941296                ) );
    … …  
    13331335                        ) ),
    13341336                        'callback'    => 'wsp_execute_woo_create_order_note',
    1335                         'capability'  => 'edit_posts',
     1337                        'capability'  => 'manage_woocommerce',
    13361338                        'enable_key'  => 'wsp/woo-create-order-note',
    13371339                ) );
    … …  
    13511353                        ) ),
    13521354                        'callback'    => 'wsp_execute_woo_report_sales',
    1353                         'capability'  => 'edit_posts',
     1355                        'capability'  => 'manage_woocommerce',
    13541356                        'enable_key'  => 'wsp/woo-report-sales',
    13551357                ) );
    … …  
    13711373                        ) ),
    13721374                        'callback'    => 'wsp_execute_woo_moderate_review',
    1373                         'capability'  => 'edit_posts',
     1375                        'capability'  => 'manage_woocommerce',
    13741376                        'enable_key'  => 'wsp/woo-moderate-review',
    13751377                ) );
  • wsp-mcp-ai-agents-connector/trunk/readme.txt

    r3809511 r3813840  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 2.9.9
     7Stable tag: 3.0.0
    88License: GPL-2.0-or-later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    128128== Changelog ==
    129129
     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
    130134= 2.9.9 =
    131135* New: Enable All / Disable All button on MCP > Settings (asks for confirmation before enabling everything).
    … …  
    282286== Upgrade Notice ==
    283287
     288= 3.0.0 =
     289Security update: WooCommerce order, sales and product-update tools now require the manage_woocommerce capability. Update recommended.
     290
    284291= 2.9.9 =
    285292Adds 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  
    33 * Plugin Name: WSP MCP - Free MCP Plugin for WordPress: Connect Claude, ChatGPT & AI Agents
    44 * 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.9
     5 * Version: 3.0.0
    66 * Requires at least: 6.9
    77 * Requires PHP: 7.4
    … …  
    1515if ( ! defined( 'ABSPATH' ) ) exit;
    1616
    17 define( 'WSP_MCP_VERSION', '2.9.9' );
     17define( 'WSP_MCP_VERSION', '3.0.0' );
    1818define( 'WSP_MCP_OPTION', 'wsp_mcp_abilities' );
    1919define( 'WSP_MCP_DIR', plugin_dir_path( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.