From 915bff251003382b2e5af50c5b99489cc2a735ce Mon Sep 17 00:00:00 2001 From: amirition Date: Tue, 9 Jan 2024 12:17:31 +0330 Subject: [PATCH] change the description --- SECURITY.md | 2 +- assets/blueprints/blueprint.json | 55 ++++++++++++++++++++++++++++++++ readme.txt | 4 +-- src/Plugin.php | 6 +++- templates/product-tab-html.php | 3 ++ woocommerce-product-tabs.php | 14 +++----- 6 files changed, 71 insertions(+), 13 deletions(-) create mode 100644 assets/blueprints/blueprint.json diff --git a/SECURITY.md b/SECURITY.md index 7b48bf1..a314004 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,6 +2,6 @@ ## Reporting a Vulnerability -Please report security bugs found in the source code for the *Document Library Lite* plugin through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/document-library-lite). +Please report security bugs found in the source code for the *WooCommerce Product Tabs* plugin through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/woocommerce-product-tabs). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin. diff --git a/assets/blueprints/blueprint.json b/assets/blueprints/blueprint.json new file mode 100644 index 0000000..392c962 --- /dev/null +++ b/assets/blueprints/blueprint.json @@ -0,0 +1,55 @@ +{ + "landingPage": "/?post_type=product", + "preferredVersions": { + "php": "8.0", + "wp": "latest" + }, + "phpExtensionBundles": [], + "steps": [ + { + "step": "login", + "username": "admin", + "password": "password" + }, + { + "step": "installPlugin", + "pluginZipFile": { + "resource": "wordpress.org\/plugins", + "slug": "woocommerce" + }, + "options": { + "activate": true + } + }, + { + "step": "installPlugin", + "pluginZipFile": { + "resource": "wordpress.org\/plugins", + "slug": "woocommerce-product-tabs" + }, + "options": { + "activate": true + } + }, + { + "step": "runPHP", + "code": " 'hoodie'));\nwp_insert_term( 'Accessory', 'product_cat', array( 'slug' => 'accessory'));" + }, + { + "step": "runPHP", + "code": " 5,\n'post_type' => 'product',\n'post_title' => 'Hoodie',\n'post_content' => '\n

This is a hoodie.

\n',\n'post_status' => 'publish',\n'post_author' => 1\n, 'post_category' => [17] ));" + }, + { + "step": "runPHP", + "code": " 6,\n'post_type' => 'product',\n'post_title' => 'Mug',\n'post_content' => '\n

This is a mug.

\n',\n'post_status' => 'publish',\n'post_author' => 1\n, 'post_category' => [18] ));" + }, + { + "step": "runPHP", + "code": " 7,\n'post_type' => 'product',\n'post_title' => 'T-shirt',\n'post_content' => '\n

This is a T-shirt.

\n',\n'post_status' => 'publish',\n'post_author' => 1\n, 'post_category' => [17] ));" + }, + { + "step": "runPHP", + "code": " 100,\n'post_type' => 'woo_product_tab',\n'post_title' => 'Shipping',\n'post_content' => '\n

There is some additional info about the product shipping.

\n',\n'post_status' => 'publish',\n'post_author' => 1\n,'meta_input' => array( '_wpt_conditions_category' => '17' ) ));" + } + ] +} \ No newline at end of file diff --git a/readme.txt b/readme.txt index fd4089c..faf2bff 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Contributors: barn2media Tags: tabs, custom tabs, product tabs, woocommerce product tab, product custom tabs, multiple product tabs, woocommerce custom tabs, woocommerce product custom tabs, multiple product tabs, woocommerce tabs, tabs for woocommerce, product tab, woocommerce, product, woocommerce product tabs, custom tab, woo product custom tabs, change tab, product page tabs, woocommerce custom tab, woocommerce tab, tabs plugin, woocommerce tabs plugin Requires PHP: 7.4 Requires at least: 6.0 -Tested up to: 6.4 +Tested up to: 6.4.2 Stable tag: 2.1.0 License: GNU General Public License v3.0 License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -127,7 +127,7 @@ Please report any security bugs through the [Patchstack Vulnerability Disclosure == Changelog == = 2.1.0 = -Release date 4 January 2024 +Release date 9 January 2024 * Fixed the error when pro version is activated * Updated assets diff --git a/src/Plugin.php b/src/Plugin.php index ff32d5f..de30402 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -68,12 +68,16 @@ public function register() { */ public function maybe_load_plugin() { // Don't load plugin if Pro version active - if ( function_exists( '\Barn2\Plugin\WC_Product_Tabs_Pro\wta' ) ) { + if ( function_exists( '\\Barn2\\Plugin\\WC_Product_Tabs_Pro\\wta' ) ) { return; } } public function add_services() { + // Don't load plugin if Pro version active + if ( function_exists( '\\Barn2\\Plugin\\WC_Product_Tabs_Pro\\wta' ) ) { + return; + } $this->add_service( 'wizard', new Setup_Wizard( $this ) ); $this->add_service( 'post_type', new Post_Type() ); diff --git a/templates/product-tab-html.php b/templates/product-tab-html.php index 8b0380d..87acea6 100644 --- a/templates/product-tab-html.php +++ b/templates/product-tab-html.php @@ -1,3 +1,6 @@ +