Skip to content

Commit

Permalink
change the description
Browse files Browse the repository at this point in the history
  • Loading branch information
amirition committed Jan 9, 2024
1 parent d28434a commit 915bff2
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 13 deletions.
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
55 changes: 55 additions & 0 deletions assets/blueprints/blueprint.json
Original file line number Diff line number Diff line change
@@ -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": "<?php\ninclude 'wordpress/wp-load.php';\nwp_insert_term( 'Hoodie', 'product_cat', array( 'slug' => 'hoodie'));\nwp_insert_term( 'Accessory', 'product_cat', array( 'slug' => 'accessory'));"
},
{
"step": "runPHP",
"code": "<?php\ninclude 'wordpress/wp-load.php';\nwp_insert_post(array(\n'import_id' => 5,\n'post_type' => 'product',\n'post_title' => 'Hoodie',\n'post_content' => '<!-- wp:paragraph -->\n<p>This is a hoodie.</p>\n<!-- \/wp:paragraph -->',\n'post_status' => 'publish',\n'post_author' => 1\n, 'post_category' => [17] ));"
},
{
"step": "runPHP",
"code": "<?php\ninclude 'wordpress/wp-load.php';\nwp_insert_post(array(\n'import_id' => 6,\n'post_type' => 'product',\n'post_title' => 'Mug',\n'post_content' => '<!-- wp:paragraph -->\n<p>This is a mug.</p>\n<!-- \/wp:paragraph -->',\n'post_status' => 'publish',\n'post_author' => 1\n, 'post_category' => [18] ));"
},
{
"step": "runPHP",
"code": "<?php\ninclude 'wordpress/wp-load.php';\nwp_insert_post(array(\n'import_id' => 7,\n'post_type' => 'product',\n'post_title' => 'T-shirt',\n'post_content' => '<!-- wp:paragraph -->\n<p>This is a T-shirt.</p>\n<!-- \/wp:paragraph -->',\n'post_status' => 'publish',\n'post_author' => 1\n, 'post_category' => [17] ));"
},
{
"step": "runPHP",
"code": "<?php\ninclude 'wordpress/wp-load.php';\nwp_insert_post(array(\n'import_id' => 100,\n'post_type' => 'woo_product_tab',\n'post_title' => 'Shipping',\n'post_content' => '<!-- wp:paragraph -->\n<p>There is some additional info about the product shipping.</p>\n<!-- \/wp:paragraph -->',\n'post_status' => 'publish',\n'post_author' => 1\n,'meta_input' => array( '_wpt_conditions_category' => '17' ) ));"
}
]
}
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() );

Expand Down
3 changes: 3 additions & 0 deletions templates/product-tab-html.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<?php
defined( 'ABSPATH' ) || exit;
?>
<div id="product_tabs" class="panel woocommerce_options_panel">
<?php
$post_id = get_the_ID();
Expand Down
14 changes: 5 additions & 9 deletions woocommerce-product-tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,22 @@
* Version: 2.1.0
* Author: Barn2 Plugins
* Author URI: https://barn2.com
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: woocommerce-product-tabs
* Domain Path: /languages
* Requires PHP: 7.4
* Requires at least: 6.0
* Tested up to: 6.4
* Tested up to: 6.4.2
* WC requires at least: 6.5
* WC tested up to: 8.4.0
*
* Copyright: Barn2 Media Ltd
* License: GNU General Public License v3.0
* License URI: https://www.gnu.org/licenses/gpl.html
*
* @package Woocommerce_Product_Tabs
*/

namespace Barn2\Plugin\WC_Product_Tabs_Free;

// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}

// Prevent direct file access
if ( ! defined( 'ABSPATH' ) ) {
exit;
Expand Down

0 comments on commit 915bff2

Please sign in to comment.