Plugin Directory

Changeset 3022582

Timestamp:
01/16/2024 06:21:48 PM (6 months ago)
Author:
Barn2Media
Message:

Update to version 2.1.0.1 from GitHub

Location:
woocommerce-product-tabs
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • woocommerce-product-tabs/tags/2.1.0.1/readme.txt

    r3019157 r3022582  
    11=== WooCommerce Product Tabs ===
    22
    3 Contributors: barn2media
     3Contributors: barn2media
    44Tags: 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
    55Requires PHP: 7.4
    66Requires at least: 6.0
    77Tested up to: 6.4.2
    8 Stable tag: 2.1.0
     8Stable tag: 2.1.0
    99License: GNU General Public License v3.0
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1111Donate link: https://barn2.com
    1212
    13 Discover the easy way to add extra tabs to your WooCommerce product pages. 
     13Discover the easy way to add extra tabs to your WooCommerce product pages.
    1414
    1515== Description ==
     
    1717WooCommerce Product Tabs lets you add an unlimited number of extra tabs to any or all of your product pages.
    1818
    19 Each tab has a WYSIWYG editor which you can use to add absolutely any type of information to the product page. You can add HTML code, shortcodes, images, videos, audio embeds - the possibilities are endless! 
    20 
    21 Adding extra tabs to product pages is an excellent way to provide more information to customers without adding clutter or affecting the layout. Here are some examples of popular uses for WooCommerce product tabs: 
    22 
    23 - **Extra product information** - Add a product specifications tab, downloads tab, FAQ tab, ingredients or materials tab, size guide, assembly/usage instructions, unboxing videos, demos, and 3D models. 
    24 - **Reassure customers** - Create WooCommerce product page tabs to showcase your certifications, warranty information, 
     19Each tab has a WYSIWYG editor which you can use to add absolutely any type of information to the product page. You can add HTML code, shortcodes, images, videos, audio embeds - the possibilities are endless!
     20
     21Adding extra tabs to product pages is an excellent way to provide more information to customers without adding clutter or affecting the layout. Here are some examples of popular uses for WooCommerce product tabs:
     22
     23- **Extra product information** - Add a product specifications tab, downloads tab, FAQ tab, ingredients or materials tab, size guide, assembly/usage instructions, unboxing videos, demos, and 3D models.
     24- **Reassure customers** - Create WooCommerce product page tabs to showcase your certifications, warranty information,
    2525- **Add social proof to the WooCommerce product page** - Add customers testimonials with photos and videos, or embed social media feeds.
    26 - **Additional order information** - Add a shipping or delivery tab to your product pages, provide location-specific information and maps, or even a product enquiry tab by using WooCommerce Product Tabs with your favorite WordPress contact form plugin. 
    27 - **Company background** - Customers love knowing who they’re ordering from. Add personality to your brand by adding a charitable causes tab, a sustainability tab, or a tab describing your company story and history. 
    28 - **Upsell related products** - Display related products or items from the same collection in an extra tab on the product page. This helps to increase your average order value. 
    29 - **Legal information** - Add extra product page tabs to provide legal information, your returns policy, or financing options. 
    30 - **Customer support** - Provide information on how customers can get in touch, or even embed a support forum or live chat widget in the extra product page tab. 
    31 
    32 Whatever type of extra tabs you want to create, you’ll find that Product Tabs is easily the best WooCommerce tab manager plugin. 
     26- **Additional order information** - Add a shipping or delivery tab to your product pages, provide location-specific information and maps, or even a product enquiry tab by using WooCommerce Product Tabs with your favorite WordPress contact form plugin.
     27- **Company background** - Customers love knowing who they’re ordering from. Add personality to your brand by adding a charitable causes tab, a sustainability tab, or a tab describing your company story and history.
     28- **Upsell related products** - Display related products or items from the same collection in an extra tab on the product page. This helps to increase your average order value.
     29- **Legal information** - Add extra product page tabs to provide legal information, your returns policy, or financing options.
     30- **Customer support** - Provide information on how customers can get in touch, or even embed a support forum or live chat widget in the extra product page tab.
     31
     32Whatever type of extra tabs you want to create, you’ll find that Product Tabs is easily the best WooCommerce tab manager plugin.
    3333
    3434[Homepage](https://barn2.com/wordpress-plugins/woocommerce-product-tabs/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&utm_content=wta-wporg) | [Documentation](https://barn2.com/kb/woocommerce-product-tabs-free-documentation/) | [Support](https://wordpress.org/support/plugin/woocommerce-product-tabs/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&utm_content=wta-wporg) | [Buy Pro](https://barn2.com/wordpress-plugins/woocommerce-product-tabs/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&utm_content=wta-wporg#pricing)
     
    3636###WooCommerce Product Tabs (free) includes:###
    3737
    38 - Create an unlimited number of WooCommerce product page tabs. 
    39 - Add flexible tab content using the user-friendly WYSIWYG editor, including shortcodes and HTML. 
     38- Create an unlimited number of WooCommerce product page tabs.
     39- Add flexible tab content using the user-friendly WYSIWYG editor, including shortcodes and HTML.
    4040- Assign tabs based on product category, or set them to appear globally on all products.
    4141- Re-order tabs by setting priorities.
     
    4545[View free & pro comparison table](https://barn2.com/kb/woocommerce-product-tabs-free-pro-comparison/)
    4646
    47 - Easily re-order tabs using drag-and-drop (both your own custom tabs and the default tabs). 
    48 - Add an icon to each tab name. 
    49 - Hide or rename the default WooCommerce tabs (Description, Reviews and Additional Information), and add an icon. 
    50 - Add tabs to individual products. 
    51 - Add tabs based on product tags. 
    52 - Create tabs centrally or directly on the ‘Edit Product’ screen for individual products. 
    53 - Allow the names and content of your extra product page tabs to appear in the onsite WooCommerce product search results. 
     47- Easily re-order tabs using drag-and-drop (both your own custom tabs and the default tabs).
     48- Add an icon to each tab name.
     49- Hide or rename the default WooCommerce tabs (Description, Reviews and Additional Information), and add an icon.
     50- Add tabs to individual products.
     51- Add tabs based on product tags.
     52- Create tabs centrally or directly on the ‘Edit Product’ screen for individual products.
     53- Allow the names and content of your extra product page tabs to appear in the onsite WooCommerce product search results.
    5454
    5555See the premium version in action on the [plugin demo site](https://producttabs.barn2.com/), and view the plugin documentation in our [knowledge base](https://barn2.com/kb-categories/product-tabs-documentation/).
     
    6060- [WooCommerce Quick View Pro](https://barn2.com/wordpress-plugins/woocommerce-quick-view-pro/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&utm_content=wta-wporg) - Add quick view buttons to your shop pages, with the extra tabs displayed in a product lightbox. No need for customers to visit separate product pages!
    6161- [Document Library Pro](https://barn2.com/wordpress-plugins/document-library-pro/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&utm_content=wta-wporg) - Add a structured list of product-related documents to your extra tabs, complete with download buttons and preview buttons.
    62 - [WooCommerce Product Table](https://barn2.com/wordpress-plugins/woocommerce-product-table/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&utm_content=wta-wporg) - Easily list related products in a quick order form within your extra product page tabs. 
     62- [WooCommerce Product Table](https://barn2.com/wordpress-plugins/woocommerce-product-table/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&utm_content=wta-wporg) - Easily list related products in a quick order form within your extra product page tabs.
    6363
    6464
     
    8686= How can I choose which products to display each tab on? =
    8787
    88 The free plugin lets you set tabs to appear globally on all products; or assign tabs to all products in a specific category or sub-category. The [premium version](https://barn2.com/wordpress-plugins/woocommerce-product-tabs/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&utm_content=wta-wporg) also lets you add tabs directly to individual products, or assign tabs based on product tags. 
     88The free plugin lets you set tabs to appear globally on all products; or assign tabs to all products in a specific category or sub-category. The [premium version](https://barn2.com/wordpress-plugins/woocommerce-product-tabs/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&utm_content=wta-wporg) also lets you add tabs directly to individual products, or assign tabs based on product tags.
    8989
    9090= Is there a premium version with more features? =
     
    9494= Where can I find the documentation? =
    9595
    96 We have provided a [documentation page](https://barn2.com/kb/woocommerce-product-tabs-free-documentation/) for the free WooCommerce Product Tabs plugin, plus a full [knowledge base](https://barn2.com/kb-categories/product-tabs-documentation/) for the premium version. 
     96We have provided a [documentation page](https://barn2.com/kb/woocommerce-product-tabs-free-documentation/) for the free WooCommerce Product Tabs plugin, plus a full [knowledge base](https://barn2.com/kb-categories/product-tabs-documentation/) for the premium version.
    9797
    9898= Does this plugin work with all themes? =
     
    114114= How can I set the order of the product page tabs? =
    115115
    116 Use the priority field to control the order of the tabs. The lowest number tab will appear first on product pages. Set the priorities bearing in mind that WooCommerce has already assigned a priority of 10 to the Description tab, 20 to the Additional Information tab, and 30 to the Reviews tab. For an easier way to sort the tabs, [upgrade to the premium version](https://barn2.com/wordpress-plugins/woocommerce-product-tabs/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&utm_content=wta-wporg) which has drag-and-drop tab re-ordering. 
     116Use the priority field to control the order of the tabs. The lowest number tab will appear first on product pages. Set the priorities bearing in mind that WooCommerce has already assigned a priority of 10 to the Description tab, 20 to the Additional Information tab, and 30 to the Reviews tab. For an easier way to sort the tabs, [upgrade to the premium version](https://barn2.com/wordpress-plugins/woocommerce-product-tabs/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&utm_content=wta-wporg) which has drag-and-drop tab re-ordering.
    117117
    118118= Where do I report security bugs found in this plugin? =
     
    126126
    127127== Changelog ==
     128
     129
     130
     131
     132
    128133
    129134= 2.1.0 =
     
    217222
    218223= 2.0.6 =
    219 Release date 15 July 2021 
     224Release date 15 July 2021
    220225
    221226* Fix: PHP error in PHP 7.1
  • woocommerce-product-tabs/tags/2.1.0.1/src/Admin/Admin_Controller.php

    r3019157 r3022582  
    11<?php
     2
    23namespace Barn2\Plugin\WC_Product_Tabs_Free\Admin;
    34
    4 use Barn2\Plugin\WC_Product_Tabs_Free\Admin\Wizard\Setup_Wizard,
    5     Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Util,
    6     Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Plugin\Plugin,
    7     Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Service_Container,
    8     Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Registerable,
    9     Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Service,
    10     Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Admin\Plugin_Promo,
    11     Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Admin\Settings_API_Helper;
    12 use Barn2\Plugin\WC_Product_Tabs_Free\Post_Type;
     5use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Admin\Plugin_Promo;
     6use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Admin\Settings_API_Helper;
     7use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Plugin\Plugin;
     8use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Registerable;
     9use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Service;
     10use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Service_Container;
    1311
    1412/**
     
    3028
    3129    public function __construct( Plugin $plugin ) {
    32         $this->plugin = $plugin;
    33         $this->plugin_name       = $plugin->get_slug();
    34         $this->version           = $plugin->get_version();
     30        $this->plugin = $plugin;
     31        $this->plugin_name = $plugin->get_slug();
     32        $this->version     = $plugin->get_version();
    3533        $this->add_services();
    3634    }
     
    5553        $this->add_service( 'settings_page', new Settings_Page( $this->plugin ) );
    5654        $this->add_service( 'single_tab', new Single_Tab() );
    57         $this->add_service( 'product_editor_tabs', new Product_Editor_Tabs() );
     55        $this->add_service( 'product_editor_tabs', new Product_Editor_Tabs() );
    5856    }
    5957
     
    7977     * Adds a Pro version link on the Plugins list.
    8078     *
    81      * @param array $links
     79     * @param array $links
    8280     * @param string $file
    8381     * @return array
     
    109107        $screen = get_current_screen();
    110108        // Main Settings Page
    111     // TODO: Check this condition later
    112         $screen_ids = [ 'edit-woo_product_tab', 'admin_page_wta_settings', 'woo_product_tab' ]; 
     109// TODO: Check this condition later
     110        $screen_ids = [ 'edit-woo_product_tab', 'admin_page_wta_settings', 'woo_product_tab' ];
    113111        if ( in_array( $screen->id, $screen_ids ) ) {
    114112            wp_enqueue_script( $this->plugin_name . '-settings', plugin_dir_url( __DIR__ ) . '../assets/js/admin/settings.js', [ 'jquery', 'wp-element', 'wp-api-fetch' ], $this->version, true );
    115113        }
    116        
     114
    117115        if ( in_array( $screen->id, $screen_ids ) || ( $screen->id === 'product' && ! isset( $_GET['page'] ) ) ) {
    118116            wp_enqueue_style( $this->plugin_name . '-tab', plugin_dir_url( __DIR__ ) . '../assets/css/admin/tab.css', array(), $this->version, 'all' );
    119117
    120118        }
    121         if( $screen->id === 'product' && ! isset( $_GET['page'] ) ) {
     119        if( $screen->id === 'product' && ! isset( $_GET['page'] ) ) {
    122120            wp_enqueue_script( $this->plugin_name . '-product', plugin_dir_url( __DIR__ ) . '../assets/js/admin/product.js', [ 'jquery' ], $this->version, true );
    123121        }
    124122
    125         if( $screen->id === 'toplevel_page_woocommerce-product-tabs-setup-wizard' ) {
     123        if( $screen->id === 'toplevel_page_woocommerce-product-tabs-setup-wizard' ) {
    126124            wp_enqueue_style( $this->plugin_name . '-tab', plugin_dir_url( __DIR__ ) . '../assets/css/admin/wizard.css', array(), $this->version, 'all' );
    127125            wp_enqueue_editor();
  • woocommerce-product-tabs/tags/2.1.0.1/src/Admin/Product_Editor_Tabs.php

    r3019157 r3022582  
    33namespace Barn2\Plugin\WC_Product_Tabs_Free\Admin;
    44
    5 use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Registerable,
    6 Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Service;
     5use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Registerable
     6Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Service;
    77
    88/**
     
    1616class Product_Editor_Tabs implements Registerable, Service {
    1717
    18   /**
    19    * List of the tabs related to the current product
    20    */
    21   private $product_tabs_list;
     18    private $plugin_dir_path;
    2219
    23   public function __construct() {
     20    /**
     21     * List of the tabs related to the current product
     22     */
     23    private $product_tabs_list;
     24
     25    public function __construct( $dir_path ) {
     26        $this->plugin_dir_path   = $dir_path;
    2427        $this->product_tabs_list = get_posts(
    2528            [
     
    3538            }
    3639        }
    37   }
     40}
    3841
    39   public function register() {
    40     add_filter( 'woocommerce_product_data_tabs', [ $this, 'product_data_tab' ], 99, 1 );
     42public function register() {
     43add_filter( 'woocommerce_product_data_tabs', [ $this, 'product_data_tab' ], 99, 1 );
    4144        add_action( 'woocommerce_product_data_panels', [ $this, 'product_data_fields' ] );
    4245        add_action( 'save_post', [ $this, 'save_product_tab_data' ] );
    4346        add_filter( 'wp_insert_post_data', [ $this, 'insert_tab_menu_order' ], 99, 2 );
    4447        add_action( 'admin_head', [ $this, 'post_type_menu_active' ] );
    45   }
    46   /**
     48    }
     49
     50    /**
    4751     * Add Product Tabs in Product Page.
    4852     *
     
    6367     */
    6468    function product_data_fields() {
    65 
    66         include(WP_PLUGIN_DIR . '/woocommerce-product-tabs/templates/product-tab-html.php' );
    67 
     69        include_once $this->plugin_dir_path . 'templates/product-tab-html.php';
    6870    }
    6971
     
    7476     */
    7577    function save_product_tab_data( $post_id ) {
     78
    7679
    77         if ( ! isset( $_POST['_wpt_product_data_nonce'] ) ) {
    78             return;
    79         }
    8080        // Verify that the nonce is valid.
    81         if ( ! wp_verify_nonce( $_POST['_wpt_product_data_nonce'], 'wpt_product_data' ) ) {
     81        if ( , 'wpt_product_data' ) ) {
    8282            return;
    8383        }
    8484
    85         if ( ( get_post_type( $post_id ) == 'product' ) ) {
     85        if ( 'product' !== filter_input( INPUT_POST, 'post_type', FILTER_SANITIZE_SPECIAL_CHARS ) ) {
     86            return;
     87        }
    8688
    87             $tabs = $this->product_tabs_list;
     89        if ( empty( $this->product_tabs_list ) ) {
     90            return;
     91        }
    8892
    89             if ( ! empty( $tabs ) ) {
    90                 foreach ( $_POST as $key => $p ) {
    91                     $str = substr( $key, 0, 11 );
    92                     if ( ( '_wpt_field_' === $str ) ) {
    93                         $tab_id = intval( substr( $key, 15 ) );
    94                         // Update the meta field in the database.
    95                         $override_value = $_POST[ '_wpt_override_wpt-' . $tab_id ] ?? 'no';
    96                         update_post_meta( $post_id, '_wpt_override_wpt-' . $tab_id, $override_value );
    97                         if( $override_value === 'yes' ) {
    98                             // Update the tab content
    99                             if ( empty( $p ) ) {
    100                                 delete_post_meta( $post_id, $key );
    101                             } else {
    102                                 update_post_meta( $post_id, $key, wp_kses_post( $p ) );
    103                             }
     93        $posted_tab_data = array_filter(
     94            $_POST,
     95            function ( $key ) {
     96                return '_wpt_field_' === substr( $key, 0, 11 );
     97            },
     98            ARRAY_FILTER_USE_KEY
     99        );
    104100
    105                             // Update the tab icon
    106                             if( empty( $_POST[ '_wpt_icon_wpt-' . $tab_id ] ) ) {
    107                                 delete_post_meta( $post_id, '_wpt_icon_wpt-' . $tab_id );
    108                             } else {
    109                                 update_post_meta( $post_id, '_wpt_icon_wpt-' . $tab_id, $_POST[ '_wpt_icon_wpt-' . $tab_id ] );
    110                             }
    111                         } else {
    112                             // If the checkbox is not enabled, replace the content and icon with the default
    113                             delete_post_meta( $post_id, $key );
    114                             delete_post_meta( $post_id, '_wpt_icon_wpt-' . $tab_id );
    115                         }   
    116                     }
    117                 }
     101        foreach ( $posted_tab_data as $post_key => $tab_content ) {
     102            $tab_slug       = substr( $post_key, 11 );
     103            $override_value = filter_input( INPUT_POST, '_wpt_override_' . $tab_slug, FILTER_SANITIZE_SPECIAL_CHARS );
     104
     105            if ( 'yes' !== $override_value ) {
     106                $override_value = 'no';
     107            }
     108
     109            update_post_meta( $post_id, '_wpt_override_' . $tab_slug, $override_value );
     110
     111            if ( 'yes' === $override_value ) {
     112                // Update the tab content.
     113                update_post_meta( $post_id, $post_key, wp_kses_post( $tab_content ) );
     114            } else {
     115                // If the checkbox is not enabled, delete the tab content post meta.
     116                delete_post_meta( $post_id, $post_key, '' );
    118117            }
    119118        }
    120 
    121119    }
    122120
     
    140138        if ( $screen->post_type === 'woo_product_tab' ) {
    141139            ?>
    142         <script type="text/javascript">
    143             jQuery(document).ready(function(){
    144             jQuery('ul.wp-submenu li a[href*="edit.php?post_type=woo_product_tab"]').parent().addClass('current');
    145             });
    146         </script>
     140        <script type="text/javascript">
     141            {
     142            );
     143            );
     144        </script>
    147145            <?php
    148146        }
  • woocommerce-product-tabs/tags/2.1.0.1/src/Product_Tabs.php

    r3019157 r3022582  
    33namespace Barn2\Plugin\WC_Product_Tabs_Free;
    44
    5 use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Registerable,
    6 Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Service;
     5use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Registerable
     6Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Service;
    77
    88/**
    9  * Show the tabs on the single peoduct page
     9 * Show the tabs on the single poduct page
    1010 *
    1111 * @package   Barn2/woocommerce-product-tabs
     
    1616class Product_Tabs implements Registerable, Service {
    1717
    18   public function register() {
    19     // Public custom hooks
    20     add_filter( 'woocommerce_product_tabs', [ $this, 'custom_woocommerce_product_tabs' ], 20 );
    21     add_filter( 'wc_quick_view_pro_quick_view_tabs_enabled', [ $this, 'custom_woocommerce_product_tabs' ], 20 );
     18public function register() {
     19// Public custom hooks
     20add_filter( 'woocommerce_product_tabs', [ $this, 'custom_woocommerce_product_tabs' ], 20 );
     21add_filter( 'wc_quick_view_pro_quick_view_tabs_enabled', [ $this, 'custom_woocommerce_product_tabs' ], 20 );
    2222
    2323        add_filter( 'wpt_filter_product_tabs', [ $this, 'tab_status_check' ] );
    2424
    2525
    26     if ( $this->enable_the_content_filter() ) {
     26if ( $this->enable_the_content_filter() ) {
    2727            add_filter( 'wpt_use_the_content_filter', '__return_false' );
    2828            add_filter( 'wpt_filter_tab_content', array( $this, 'product_tabs_filter_content' ), 10, 1 );
    2929        }
    30   }
    31 
    32   public function custom_woocommerce_product_tabs( $tabs ){
     30}
     31
     32{
    3333        global $product;
    3434
     
    4343
    4444        if ( ! empty( $this->product_tabs_list ) ) {
    45             foreach ($this->product_tabs_list as $key => $t) {
    46                 $this->product_tabs_list[$key]->post_meta = get_post_meta($this->product_tabs_list[$key]->ID);
     45            foreach () {
     46                $this->product_tabs_list[);
    4747            }
    4848        }
     
    5353
    5454        $wpt_tabs = array();
    55         foreach ($this->product_tabs_list as $key => $prd) {
    56             $wpt_tabs[$key]['id'] = $prd->post_name;
    57             $wpt_tabs[$key]['title'] = esc_attr( $prd->post_title );
    58             $wpt_tabs[$key]['priority'] = esc_attr( $prd->menu_order );
    59             $wpt_tabs[$key]['conditions_category'] = get_post_meta( $prd->ID, '_wpt_conditions_category', true );
    60             $wpt_tabs[$key]['display_globally'] = esc_attr( get_post_meta( $prd->ID, '_wpt_display_tab_globally', true ) );
     55        foreach () {
     56            $wpt_tabs[ = $prd->post_name;
     57            $wpt_tabs[ = esc_attr( $prd->post_title );
     58            $wpt_tabs[ = esc_attr( $prd->menu_order );
     59            $wpt_tabs[]['conditions_category'] = get_post_meta( $prd->ID, '_wpt_conditions_category', true );
     60            $wpt_tabs[ = esc_attr( get_post_meta( $prd->ID, '_wpt_display_tab_globally', true ) );
    6161        }
    6262
     
    6565        if ( ! empty( $wpt_tabs ) ) {
    6666
    67             foreach ($wpt_tabs as $key => $tab) {
     67            foreach () {
    6868                $tab_temp             = array();
    6969                $tab_temp['title']    = $tab['title'];
    7070                $tab_temp['priority'] = $tab['priority'];
    7171                $tab_temp['callback'] = array( $this, 'callback' );
    72                 $tabs[$tab['id']]     = $tab_temp;
     72                $tabs[   = $tab_temp;
    7373            }
    7474
     
    7979    }
    8080
    81   public function tab_status_check( $tabs ){
    82 
    83     global $product;
    84 
    85     if ( ! empty( $tabs ) && is_array( $tabs ) ) {
    86 
    87       foreach ($tabs as $tab_key => $tab) {
    88         $key = $tab['id'];
    89 
    90         $tab_post = get_page_by_path( $key, OBJECT, 'woo_product_tab' );
    91 
    92         if ( ! empty( $tab_post ) ) {
    93           //
    94           $tab_default_value = $tab_post->post_content ;
    95 
    96           $content_to_show = $tab_default_value;
    97 
    98           if ( 'yes' === get_post_meta( $product->get_id(), '_wpt_override_' . $key, true ) ) {
     81{
     82
     83global $product;
     84
     85if ( ! empty( $tabs ) && is_array( $tabs ) ) {
     86
     87) {
     88$key = $tab['id'];
     89
     90$tab_post = get_page_by_path( $key, OBJECT, 'woo_product_tab' );
     91
     92if ( ! empty( $tab_post ) ) {
     93
     94;
     95
     96$content_to_show = $tab_default_value;
     97
     98if ( 'yes' === get_post_meta( $product->get_id(), '_wpt_override_' . $key, true ) ) {
    9999                        $tab_value = get_post_meta( $product->get_id(), '_wpt_field_' . $key, true );
    100100                        if ( ! empty( $tab_value ) ) {
     
    103103                    }
    104104
    105           if ( empty( $content_to_show ) ) {
    106             unset( $tabs[ $tab_key ] );
    107           }
    108 
    109           if ( ! empty( $tab['conditions_category'] ) && isset( $tabs[ $tab_key ] ) && $tab[ 'display_globally' ] === 'no' ) {
     105if ( empty( $content_to_show ) ) {
     106unset( $tabs[ $tab_key ] );
     107}
     108
     109] === 'no' ) {
    110110                        $child_categories = [];
    111                         foreach( $tab[ 'conditions_category' ] as $category ) {
     111                        foreach] as $category ) {
    112112                            $child_terms = get_terms( array(
    113                                 'child_of'              =>  $category,
    114                                 'hide_empty'            =>  true,
    115                                 'taxonomy'              =>  'product_cat',
    116                                 'fields'                    =>  'ids'
     113                                'child_of'$category,
     114                                'hide_empty'true,
     115                                'taxonomy''product_cat',
     116                                'fields''ids'
    117117                            ) );
    118118
    119                             if( is_array( $child_terms ) ) {
     119                            if( is_array( $child_terms ) ) {
    120120                                $child_categories = array_unique( array_merge( $child_categories, $child_terms ) );
    121121                            }
    122122                        }
    123123
    124                         $conditions_category = array_unique( array_merge( $tab[ 'conditions_category' ], $child_categories ) );
    125 
    126             // check category condition
    127             $cat_list = wp_get_post_terms( $product->get_id(), 'product_cat', array( 'fields' => 'ids' ) );
    128 
    129             if ( ! array_intersect( $cat_list, $conditions_category ) ) {
    130               unset( $tabs[ $tab_key ] );
    131             }
    132           }
    133         }
    134 
    135       } // end foreach
    136 
    137     }
    138     return $tabs;
    139 
    140   }
     124                        $conditions_category = array_unique( array_merge( $tab[], $child_categories ) );
     125
     126// check category condition
     127$cat_list = wp_get_post_terms( $product->get_id(), 'product_cat', array( 'fields' => 'ids' ) );
     128
     129if ( ! array_intersect( $cat_list, $conditions_category ) ) {
     130unset( $tabs[ $tab_key ] );
     131}
     132}
     133}
     134
     135} // end foreach
     136
     137}
     138return $tabs;
     139
     140}
    141141
    142142    public function callback( $key, $tab ) {
    143 
    144143        global $product;
    145144
     
    148147            return;
    149148        }
    150         $override_content = metadata_exists( 'post', $product->get_id(), '_wpt_field_' . $key );
     149
     150        $override_meta = get_post_meta( $product->get_id(), '_wpt_override_' . $key, true );
     151
     152        // The _wpt_override key doesn't exist in the older version of the plugin and the best way
     153        // to check it, is to check for the _wpt_field_ meta for the product
     154        if ( empty( $override_meta ) && get_post_meta( $product->get_id(), '_wpt_field_' . $key, true ) ) {
     155            $override_meta = 'yes';
     156        }
     157
     158        $override_content = ( 'yes' === $override_meta );
     159
    151160        if ( ! $override_content ) {
    152             // Default content for all
     161            // D
    153162            echo $this->get_filter_content( $tab_post->post_content );
    154163        } else {
     
    156165            echo $this->get_filter_content( $tab_value );
    157166        }
    158         return;
    159167    }
    160168
     
    162170     * Filter the tab content.
    163171     *
    164      * @since 2.0.2
    165      *
    166172     * @param string $content Content for the current tab.
    167173     * @return string Tab content.
     174
     175
    168176     */
    169     public function product_tabs_filter_content( $content ){
     177    public function product_tabs_filter_content( $content ){
    170178        $content = function_exists( 'capital_P_dangit' ) ? capital_P_dangit( $content ) : $content;
    171179        $content = function_exists( 'wptexturize' ) ? wptexturize( $content ) : $content;
     
    178186
    179187        if ( class_exists( 'WP_Embed' ) ) {
    180             $embed = new WP_Embed;
     188            $embed = new WP_Embed;
    181189            $content = method_exists( $embed, 'autoembed' ) ? $embed->autoembed( $content ) : $content;
    182190        }
     
    188196     * Get filter for the content.
    189197     *
    190      * @since 2.0.2
    191      *
    192198     * @param string $content Content to apply filter.
    193199     * @return string $content Tab content.
     200
     201
    194202     */
    195     public function get_filter_content( $content ){
     203    public function get_filter_content( $content ){
    196204        $use_the_content_filter = apply_filters( 'wpt_use_the_content_filter', true );
    197205
     
    211219    public function enable_the_content_filter() {
    212220        $disable_the_content_filter = get_option( 'wpt_disable_content_filter' );
    213         $output = false;
    214 
    215         if ( empty( $disable_the_content_filter ) ){
     221        $output = false;
     222
     223        if ( empty( $disable_the_content_filter ) ){
    216224            $disable_the_content_filter = 'no';
    217225        }
    218226
    219         if ( 'yes' === $disable_the_content_filter ){
     227        if ( 'yes' === $disable_the_content_filter ){
    220228            $output = true;
    221229        }
  • woocommerce-product-tabs/tags/2.1.0.1/templates/product-tab-html.php

    r3019157 r3022582  
    2020            if ( 'yes' === $tab->_wpt_display_tab_globally ) {
    2121                $show = true;
    22             }
    23             else {
     22            } else {
    2423                if ( empty( $tab->_wpt_conditions_category ) ) {
    2524                    $show = true;
    2625                } else {
    27    
     26
    2827                    if ( ! empty( $tab->_wpt_conditions_category ) && is_array( $tab->_wpt_conditions_category ) && array_intersect( $cat_list, $tab->_wpt_conditions_category ) ) {
    2928                        $show = true;
     
    3736                unset( $tab );
    3837            } elseif ( defined( 'ICL_SITEPRESS_VERSION' ) && $lang !== $tab_lang['language_code'] ) {
    39                     unset( $tab );
     38                unset( $tab );
    4039            } else {
    4140
     
    5049                    'textarea_name' => '_wpt_field_' . $tab->post_name,
    5150                    'editor_height' => '150px',
    52                     'editor_class'  => 'test-class'
     51                    'editor_class'=> 'test-class'
    5352                ];
    5453                echo '<div class="tab-container hidden">';
    55                
     54
     55                $override_value = get_post_meta( $post_id, '_wpt_override_' . $tab->post_name, true );
     56
    5657                // The _wpt_override key doesn't exist in the older version of the plugin and the best way
    5758                // to check it, is to check for the _wpt_field_ meta for the product
    58                 if( get_post_meta( $post_id, '_wpt_override_' . $tab->post_name, true ) === 'yes' || metadata_exists( 'post', $post_id, '_wpt_field_' . $tab->post_name ) ) {
     59                ife ) ) {
    5960                    $override_value = 'yes';
    60                 } else {
    61                     $override_value = get_post_meta( $post_id, '_wpt_override_' . $tab->post_name, true ) ?? 'no';
     61                }
     62
     63                if ( empty( $override_value ) ) {
     64                    $override_value = 'no';
    6265                }
    6366
    6467                // Checking this option would enable the content
    6568                $args = array(
    66                     'label'                         => __( 'Override the default tab content for this product','woocommerce-product-tabs' ),
    67                     'id'                                => '_wpt_override_'. $tab->post_name,
    68                     'name'                          => '_wpt_override_'. $tab->post_name,
    69                     'class'                         => 'override-tab-content',
    70                     'wrapper_class'         => 'override-tab-content-label',
    71                     'value'                         => $override_value,
     69                    'label' 'woocommerce-product-tabs' ),
     70                    'id' . $tab->post_name,
     71                    'name'. $tab->post_name,
     72                    'class'=> 'override-tab-content',
     73                    'wrapper_class'=> 'override-tab-content-label',
     74                    'value'=> $override_value,
    7275                );
    7376                woocommerce_wp_checkbox( $args );
     
    7578                wp_editor( $tab_value, '_wpt_field_' . esc_attr( $tab->post_name ), $settings );
    7679                echo '<div class="edit-tab-product edit-tab-footer">';
    77         echo '<a class="edit-global-tab" target="_blank" href="'. get_edit_post_link( $tab->ID ) .'"><span class="dashicons dashicons-edit"></span> '. __( 'Manage global tab', 'woocommerce-product-tabs' ) .'</a>';
     80'</a>';
    7881                echo '</div></div><br />';
    7982            }
     
    99102        woocommerce_wp_textarea_input(
    100103            [
    101                 'label'       => '',
     104                'label' => '',
    102105                'id'    => 'hidden_duplicate_content',
    103106                'class' => 'tabs_content_field'
  • woocommerce-product-tabs/tags/2.1.0.1/woocommerce-product-tabs.php

    r3019157 r3022582  
    11<?php
    22/**
     3
     4
    35 * @package   Barn2\woocommerce-product-tabs
    46 * @author    Barn2 Plugins <support@barn2.com>
     
    1012 * Plugin URI: https://barn2.com/wordpress-plugins/woocommerce-product-tabs/
    1113 * Description: Boost your product pages by adding custom tabs containing extra information.
    12  * Version: 2.1.0
     14 * Version: 2.1.0
    1315 * Author: Barn2 Plugins
    1416 * Author URI: https://barn2.com
     
    1921 * Tested up to: 6.4.2
    2022 * WC requires at least: 6.5
    21  * WC tested up to: 8.4.0
    22  * 
     23 * WC tested up to: 8.
     24 *
    2325 * Copyright:       Barn2 Media Ltd
    2426 * License:         GNU General Public License v3.0
    2527 * License URI:     https://www.gnu.org/licenses/gpl.html
    26  *
    2728 */
    2829
     
    3435}
    3536
    36 const PLUGIN_VERSION = '2.1.0';
     37const PLUGIN_VERSION = '2.1.0';
    3738const PLUGIN_FILE    = __FILE__;
    3839
  • woocommerce-product-tabs/trunk/readme.txt

    r3019157 r3022582  
    11=== WooCommerce Product Tabs ===
    22
    3 Contributors: barn2media
     3Contributors: barn2media
    44Tags: 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
    55Requires PHP: 7.4
    66Requires at least: 6.0
    77Tested up to: 6.4.2
    8 Stable tag: 2.1.0
     8Stable tag: 2.1.0
    99License: GNU General Public License v3.0
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1111Donate link: https://barn2.com
    1212
    13 Discover the easy way to add extra tabs to your WooCommerce product pages. 
     13Discover the easy way to add extra tabs to your WooCommerce product pages.
    1414
    1515== Description ==
     
    1717WooCommerce Product Tabs lets you add an unlimited number of extra tabs to any or all of your product pages.
    1818
    19 Each tab has a WYSIWYG editor which you can use to add absolutely any type of information to the product page. You can add HTML code, shortcodes, images, videos, audio embeds - the possibilities are endless! 
    20 
    21 Adding extra tabs to product pages is an excellent way to provide more information to customers without adding clutter or affecting the layout. Here are some examples of popular uses for WooCommerce product tabs: 
    22 
    23 - **Extra product information** - Add a product specifications tab, downloads tab, FAQ tab, ingredients or materials tab, size guide, assembly/usage instructions, unboxing videos, demos, and 3D models. 
    24 - **Reassure customers** - Create WooCommerce product page tabs to showcase your certifications, warranty information, 
     19Each tab has a WYSIWYG editor which you can use to add absolutely any type of information to the product page. You can add HTML code, shortcodes, images, videos, audio embeds - the possibilities are endless!
     20
     21Adding extra tabs to product pages is an excellent way to provide more information to customers without adding clutter or affecting the layout. Here are some examples of popular uses for WooCommerce product tabs:
     22
     23- **Extra product information** - Add a product specifications tab, downloads tab, FAQ tab, ingredients or materials tab, size guide, assembly/usage instructions, unboxing videos, demos, and 3D models.
     24- **Reassure customers** - Create WooCommerce product page tabs to showcase your certifications, warranty information,
    2525- **Add social proof to the WooCommerce product page** - Add customers testimonials with photos and videos, or embed social media feeds.
    26 - **Additional order information** - Add a shipping or delivery tab to your product pages, provide location-specific information and maps, or even a product enquiry tab by using WooCommerce Product Tabs with your favorite WordPress contact form plugin. 
    27 - **Company background** - Customers love knowing who they’re ordering from. Add personality to your brand by adding a charitable causes tab, a sustainability tab, or a tab describing your company story and history. 
    28 - **Upsell related products** - Display related products or items from the same collection in an extra tab on the product page. This helps to increase your average order value. 
    29 - **Legal information** - Add extra product page tabs to provide legal information, your returns policy, or financing options. 
    30 - **Customer support** - Provide information on how customers can get in touch, or even embed a support forum or live chat widget in the extra product page tab. 
    31 
    32 Whatever type of extra tabs you want to create, you’ll find that Product Tabs is easily the best WooCommerce tab manager plugin. 
     26- **Additional order information** - Add a shipping or delivery tab to your product pages, provide location-specific information and maps, or even a product enquiry tab by using WooCommerce Product Tabs with your favorite WordPress contact form plugin.
     27- **Company background** - Customers love knowing who they’re ordering from. Add personality to your brand by adding a charitable causes tab, a sustainability tab, or a tab describing your company story and history.
     28- **Upsell related products** - Display related products or items from the same collection in an extra tab on the product page. This helps to increase your average order value.
     29- **Legal information** - Add extra product page tabs to provide legal information, your returns policy, or financing options.
     30- **Customer support** - Provide information on how customers can get in touch, or even embed a support forum or live chat widget in the extra product page tab.
     31
     32Whatever type of extra tabs you want to create, you’ll find that Product Tabs is easily the best WooCommerce tab manager plugin.
    3333
    3434[Homepage](https://barn2.com/wordpress-plugins/woocommerce-product-tabs/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&amp;utm_content=wta-wporg) | [Documentation](https://barn2.com/kb/woocommerce-product-tabs-free-documentation/) | [Support](https://wordpress.org/support/plugin/woocommerce-product-tabs/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&amp;utm_content=wta-wporg) | [Buy Pro](https://barn2.com/wordpress-plugins/woocommerce-product-tabs/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&amp;utm_content=wta-wporg#pricing)
     
    3636###WooCommerce Product Tabs (free) includes:###
    3737
    38 - Create an unlimited number of WooCommerce product page tabs. 
    39 - Add flexible tab content using the user-friendly WYSIWYG editor, including shortcodes and HTML. 
     38- Create an unlimited number of WooCommerce product page tabs.
     39- Add flexible tab content using the user-friendly WYSIWYG editor, including shortcodes and HTML.
    4040- Assign tabs based on product category, or set them to appear globally on all products.
    4141- Re-order tabs by setting priorities.
     
    4545[View free & pro comparison table](https://barn2.com/kb/woocommerce-product-tabs-free-pro-comparison/)
    4646
    47 - Easily re-order tabs using drag-and-drop (both your own custom tabs and the default tabs). 
    48 - Add an icon to each tab name. 
    49 - Hide or rename the default WooCommerce tabs (Description, Reviews and Additional Information), and add an icon. 
    50 - Add tabs to individual products. 
    51 - Add tabs based on product tags. 
    52 - Create tabs centrally or directly on the ‘Edit Product’ screen for individual products. 
    53 - Allow the names and content of your extra product page tabs to appear in the onsite WooCommerce product search results. 
     47- Easily re-order tabs using drag-and-drop (both your own custom tabs and the default tabs).
     48- Add an icon to each tab name.
     49- Hide or rename the default WooCommerce tabs (Description, Reviews and Additional Information), and add an icon.
     50- Add tabs to individual products.
     51- Add tabs based on product tags.
     52- Create tabs centrally or directly on the ‘Edit Product’ screen for individual products.
     53- Allow the names and content of your extra product page tabs to appear in the onsite WooCommerce product search results.
    5454
    5555See the premium version in action on the [plugin demo site](https://producttabs.barn2.com/), and view the plugin documentation in our [knowledge base](https://barn2.com/kb-categories/product-tabs-documentation/).
     
    6060- [WooCommerce Quick View Pro](https://barn2.com/wordpress-plugins/woocommerce-quick-view-pro/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&amp;utm_content=wta-wporg) - Add quick view buttons to your shop pages, with the extra tabs displayed in a product lightbox. No need for customers to visit separate product pages!
    6161- [Document Library Pro](https://barn2.com/wordpress-plugins/document-library-pro/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&amp;utm_content=wta-wporg) - Add a structured list of product-related documents to your extra tabs, complete with download buttons and preview buttons.
    62 - [WooCommerce Product Table](https://barn2.com/wordpress-plugins/woocommerce-product-table/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&amp;utm_content=wta-wporg) - Easily list related products in a quick order form within your extra product page tabs. 
     62- [WooCommerce Product Table](https://barn2.com/wordpress-plugins/woocommerce-product-table/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&amp;utm_content=wta-wporg) - Easily list related products in a quick order form within your extra product page tabs.
    6363
    6464
     
    8686= How can I choose which products to display each tab on? =
    8787
    88 The free plugin lets you set tabs to appear globally on all products; or assign tabs to all products in a specific category or sub-category. The [premium version](https://barn2.com/wordpress-plugins/woocommerce-product-tabs/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&amp;utm_content=wta-wporg) also lets you add tabs directly to individual products, or assign tabs based on product tags. 
     88The free plugin lets you set tabs to appear globally on all products; or assign tabs to all products in a specific category or sub-category. The [premium version](https://barn2.com/wordpress-plugins/woocommerce-product-tabs/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&amp;utm_content=wta-wporg) also lets you add tabs directly to individual products, or assign tabs based on product tags.
    8989
    9090= Is there a premium version with more features? =
     
    9494= Where can I find the documentation? =
    9595
    96 We have provided a [documentation page](https://barn2.com/kb/woocommerce-product-tabs-free-documentation/) for the free WooCommerce Product Tabs plugin, plus a full [knowledge base](https://barn2.com/kb-categories/product-tabs-documentation/) for the premium version. 
     96We have provided a [documentation page](https://barn2.com/kb/woocommerce-product-tabs-free-documentation/) for the free WooCommerce Product Tabs plugin, plus a full [knowledge base](https://barn2.com/kb-categories/product-tabs-documentation/) for the premium version.
    9797
    9898= Does this plugin work with all themes? =
     
    114114= How can I set the order of the product page tabs? =
    115115
    116 Use the priority field to control the order of the tabs. The lowest number tab will appear first on product pages. Set the priorities bearing in mind that WooCommerce has already assigned a priority of 10 to the Description tab, 20 to the Additional Information tab, and 30 to the Reviews tab. For an easier way to sort the tabs, [upgrade to the premium version](https://barn2.com/wordpress-plugins/woocommerce-product-tabs/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&amp;utm_content=wta-wporg) which has drag-and-drop tab re-ordering. 
     116Use the priority field to control the order of the tabs. The lowest number tab will appear first on product pages. Set the priorities bearing in mind that WooCommerce has already assigned a priority of 10 to the Description tab, 20 to the Additional Information tab, and 30 to the Reviews tab. For an easier way to sort the tabs, [upgrade to the premium version](https://barn2.com/wordpress-plugins/woocommerce-product-tabs/?utm_source=wporg&utm_medium=freeplugin&utm_campaign=freepluginwporg&amp;utm_content=wta-wporg) which has drag-and-drop tab re-ordering.
    117117
    118118= Where do I report security bugs found in this plugin? =
     
    126126
    127127== Changelog ==
     128
     129
     130
     131
     132
    128133
    129134= 2.1.0 =
     
    217222
    218223= 2.0.6 =
    219 Release date 15 July 2021 
     224Release date 15 July 2021
    220225
    221226* Fix: PHP error in PHP 7.1
  • woocommerce-product-tabs/trunk/src/Admin/Admin_Controller.php

    r3019157 r3022582  
    11<?php
     2
    23namespace Barn2\Plugin\WC_Product_Tabs_Free\Admin;
    34
    4 use Barn2\Plugin\WC_Product_Tabs_Free\Admin\Wizard\Setup_Wizard,
    5     Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Util,
    6     Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Plugin\Plugin,
    7     Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Service_Container,
    8     Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Registerable,
    9     Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Service,
    10     Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Admin\Plugin_Promo,
    11     Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Admin\Settings_API_Helper;
    12 use Barn2\Plugin\WC_Product_Tabs_Free\Post_Type;
     5use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Admin\Plugin_Promo;
     6use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Admin\Settings_API_Helper;
     7use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Plugin\Plugin;
     8use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Registerable;
     9use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Service;
     10use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Service_Container;
    1311
    1412/**
     
    3028
    3129    public function __construct( Plugin $plugin ) {
    32         $this->plugin = $plugin;
    33         $this->plugin_name       = $plugin->get_slug();
    34         $this->version           = $plugin->get_version();
     30        $this->plugin = $plugin;
     31        $this->plugin_name = $plugin->get_slug();
     32        $this->version     = $plugin->get_version();
    3533        $this->add_services();
    3634    }
     
    5553        $this->add_service( 'settings_page', new Settings_Page( $this->plugin ) );
    5654        $this->add_service( 'single_tab', new Single_Tab() );
    57         $this->add_service( 'product_editor_tabs', new Product_Editor_Tabs() );
     55        $this->add_service( 'product_editor_tabs', new Product_Editor_Tabs() );
    5856    }
    5957
     
    7977     * Adds a Pro version link on the Plugins list.
    8078     *
    81      * @param array $links
     79     * @param array $links
    8280     * @param string $file
    8381     * @return array
     
    109107        $screen = get_current_screen();
    110108        // Main Settings Page
    111     // TODO: Check this condition later
    112         $screen_ids = [ 'edit-woo_product_tab', 'admin_page_wta_settings', 'woo_product_tab' ]; 
     109// TODO: Check this condition later
     110        $screen_ids = [ 'edit-woo_product_tab', 'admin_page_wta_settings', 'woo_product_tab' ];
    113111        if ( in_array( $screen->id, $screen_ids ) ) {
    114112            wp_enqueue_script( $this->plugin_name . '-settings', plugin_dir_url( __DIR__ ) . '../assets/js/admin/settings.js', [ 'jquery', 'wp-element', 'wp-api-fetch' ], $this->version, true );
    115113        }
    116        
     114
    117115        if ( in_array( $screen->id, $screen_ids ) || ( $screen->id === 'product' && ! isset( $_GET['page'] ) ) ) {
    118116            wp_enqueue_style( $this->plugin_name . '-tab', plugin_dir_url( __DIR__ ) . '../assets/css/admin/tab.css', array(), $this->version, 'all' );
    119117
    120118        }
    121         if( $screen->id === 'product' && ! isset( $_GET['page'] ) ) {
     119        if( $screen->id === 'product' && ! isset( $_GET['page'] ) ) {
    122120            wp_enqueue_script( $this->plugin_name . '-product', plugin_dir_url( __DIR__ ) . '../assets/js/admin/product.js', [ 'jquery' ], $this->version, true );
    123121        }
    124122
    125         if( $screen->id === 'toplevel_page_woocommerce-product-tabs-setup-wizard' ) {
     123        if( $screen->id === 'toplevel_page_woocommerce-product-tabs-setup-wizard' ) {
    126124            wp_enqueue_style( $this->plugin_name . '-tab', plugin_dir_url( __DIR__ ) . '../assets/css/admin/wizard.css', array(), $this->version, 'all' );
    127125            wp_enqueue_editor();
  • woocommerce-product-tabs/trunk/src/Admin/Product_Editor_Tabs.php

    r3019157 r3022582  
    33namespace Barn2\Plugin\WC_Product_Tabs_Free\Admin;
    44
    5 use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Registerable,
    6 Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Service;
     5use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Registerable
     6Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Service;
    77
    88/**
     
    1616class Product_Editor_Tabs implements Registerable, Service {
    1717
    18   /**
    19    * List of the tabs related to the current product
    20    */
    21   private $product_tabs_list;
     18    private $plugin_dir_path;
    2219
    23   public function __construct() {
     20    /**
     21     * List of the tabs related to the current product
     22     */
     23    private $product_tabs_list;
     24
     25    public function __construct( $dir_path ) {
     26        $this->plugin_dir_path   = $dir_path;
    2427        $this->product_tabs_list = get_posts(
    2528            [
     
    3538            }
    3639        }
    37   }
     40}
    3841
    39   public function register() {
    40     add_filter( 'woocommerce_product_data_tabs', [ $this, 'product_data_tab' ], 99, 1 );
     42public function register() {
     43add_filter( 'woocommerce_product_data_tabs', [ $this, 'product_data_tab' ], 99, 1 );
    4144        add_action( 'woocommerce_product_data_panels', [ $this, 'product_data_fields' ] );
    4245        add_action( 'save_post', [ $this, 'save_product_tab_data' ] );
    4346        add_filter( 'wp_insert_post_data', [ $this, 'insert_tab_menu_order' ], 99, 2 );
    4447        add_action( 'admin_head', [ $this, 'post_type_menu_active' ] );
    45   }
    46   /**
     48    }
     49
     50    /**
    4751     * Add Product Tabs in Product Page.
    4852     *
     
    6367     */
    6468    function product_data_fields() {
    65 
    66         include(WP_PLUGIN_DIR . '/woocommerce-product-tabs/templates/product-tab-html.php' );
    67 
     69        include_once $this->plugin_dir_path . 'templates/product-tab-html.php';
    6870    }
    6971
     
    7476     */
    7577    function save_product_tab_data( $post_id ) {
     78
    7679
    77         if ( ! isset( $_POST['_wpt_product_data_nonce'] ) ) {
    78             return;
    79         }
    8080        // Verify that the nonce is valid.
    81         if ( ! wp_verify_nonce( $_POST['_wpt_product_data_nonce'], 'wpt_product_data' ) ) {
     81        if ( , 'wpt_product_data' ) ) {
    8282            return;
    8383        }
    8484
    85         if ( ( get_post_type( $post_id ) == 'product' ) ) {
     85        if ( 'product' !== filter_input( INPUT_POST, 'post_type', FILTER_SANITIZE_SPECIAL_CHARS ) ) {
     86            return;
     87        }
    8688
    87             $tabs = $this->product_tabs_list;
     89        if ( empty( $this->product_tabs_list ) ) {
     90            return;
     91        }
    8892
    89             if ( ! empty( $tabs ) ) {
    90                 foreach ( $_POST as $key => $p ) {
    91                     $str = substr( $key, 0, 11 );
    92                     if ( ( '_wpt_field_' === $str ) ) {
    93                         $tab_id = intval( substr( $key, 15 ) );
    94                         // Update the meta field in the database.
    95                         $override_value = $_POST[ '_wpt_override_wpt-' . $tab_id ] ?? 'no';
    96                         update_post_meta( $post_id, '_wpt_override_wpt-' . $tab_id, $override_value );
    97                         if( $override_value === 'yes' ) {
    98                             // Update the tab content
    99                             if ( empty( $p ) ) {
    100                                 delete_post_meta( $post_id, $key );
    101                             } else {
    102                                 update_post_meta( $post_id, $key, wp_kses_post( $p ) );
    103                             }
     93        $posted_tab_data = array_filter(
     94            $_POST,
     95            function ( $key ) {
     96                return '_wpt_field_' === substr( $key, 0, 11 );
     97            },
     98            ARRAY_FILTER_USE_KEY
     99        );
    104100
    105                             // Update the tab icon
    106                             if( empty( $_POST[ '_wpt_icon_wpt-' . $tab_id ] ) ) {
    107                                 delete_post_meta( $post_id, '_wpt_icon_wpt-' . $tab_id );
    108                             } else {
    109                                 update_post_meta( $post_id, '_wpt_icon_wpt-' . $tab_id, $_POST[ '_wpt_icon_wpt-' . $tab_id ] );
    110                             }
    111                         } else {
    112                             // If the checkbox is not enabled, replace the content and icon with the default
    113                             delete_post_meta( $post_id, $key );
    114                             delete_post_meta( $post_id, '_wpt_icon_wpt-' . $tab_id );
    115                         }   
    116                     }
    117                 }
     101        foreach ( $posted_tab_data as $post_key => $tab_content ) {
     102            $tab_slug       = substr( $post_key, 11 );
     103            $override_value = filter_input( INPUT_POST, '_wpt_override_' . $tab_slug, FILTER_SANITIZE_SPECIAL_CHARS );
     104
     105            if ( 'yes' !== $override_value ) {
     106                $override_value = 'no';
     107            }
     108
     109            update_post_meta( $post_id, '_wpt_override_' . $tab_slug, $override_value );
     110
     111            if ( 'yes' === $override_value ) {
     112                // Update the tab content.
     113                update_post_meta( $post_id, $post_key, wp_kses_post( $tab_content ) );
     114            } else {
     115                // If the checkbox is not enabled, delete the tab content post meta.
     116                delete_post_meta( $post_id, $post_key, '' );
    118117            }
    119118        }
    120 
    121119    }
    122120
     
    140138        if ( $screen->post_type === 'woo_product_tab' ) {
    141139            ?>
    142         <script type="text/javascript">
    143             jQuery(document).ready(function(){
    144             jQuery('ul.wp-submenu li a[href*="edit.php?post_type=woo_product_tab"]').parent().addClass('current');
    145             });
    146         </script>
     140        <script type="text/javascript">
     141            {
     142            );
     143            );
     144        </script>
    147145            <?php
    148146        }
  • woocommerce-product-tabs/trunk/src/Product_Tabs.php

    r3019157 r3022582  
    33namespace Barn2\Plugin\WC_Product_Tabs_Free;
    44
    5 use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Registerable,
    6 Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Service;
     5use Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Registerable
     6Barn2\Plugin\WC_Product_Tabs_Free\Dependencies\Lib\Service;
    77
    88/**
    9  * Show the tabs on the single peoduct page
     9 * Show the tabs on the single poduct page
    1010 *
    1111 * @package   Barn2/woocommerce-product-tabs
     
    1616class Product_Tabs implements Registerable, Service {
    1717
    18   public function register() {
    19     // Public custom hooks
    20     add_filter( 'woocommerce_product_tabs', [ $this, 'custom_woocommerce_product_tabs' ], 20 );
    21     add_filter( 'wc_quick_view_pro_quick_view_tabs_enabled', [ $this, 'custom_woocommerce_product_tabs' ], 20 );
     18public function register() {
     19// Public custom hooks
     20add_filter( 'woocommerce_product_tabs', [ $this, 'custom_woocommerce_product_tabs' ], 20 );
     21add_filter( 'wc_quick_view_pro_quick_view_tabs_enabled', [ $this, 'custom_woocommerce_product_tabs' ], 20 );
    2222
    2323        add_filter( 'wpt_filter_product_tabs', [ $this, 'tab_status_check' ] );
    2424
    2525
    26     if ( $this->enable_the_content_filter() ) {
     26if ( $this->enable_the_content_filter() ) {
    2727            add_filter( 'wpt_use_the_content_filter', '__return_false' );
    2828            add_filter( 'wpt_filter_tab_content', array( $this, 'product_tabs_filter_content' ), 10, 1 );
    2929        }
    30   }
    31 
    32   public function custom_woocommerce_product_tabs( $tabs ){
     30}
     31
     32{
    3333        global $product;
    3434
     
    4343
    4444        if ( ! empty( $this->product_tabs_list ) ) {
    45             foreach ($this->product_tabs_list as $key => $t) {
    46                 $this->product_tabs_list[$key]->post_meta = get_post_meta($this->product_tabs_list[$key]->ID);
     45            foreach () {
     46                $this->product_tabs_list[);
    4747            }
    4848        }
     
    5353
    5454        $wpt_tabs = array();
    55         foreach ($this->product_tabs_list as $key => $prd) {
    56             $wpt_tabs[$key]['id'] = $prd->post_name;
    57             $wpt_tabs[$key]['title'] = esc_attr( $prd->post_title );
    58             $wpt_tabs[$key]['priority'] = esc_attr( $prd->menu_order );
    59             $wpt_tabs[$key]['conditions_category'] = get_post_meta( $prd->ID, '_wpt_conditions_category', true );
    60             $wpt_tabs[$key]['display_globally'] = esc_attr( get_post_meta( $prd->ID, '_wpt_display_tab_globally', true ) );
     55        foreach () {
     56            $wpt_tabs[ = $prd->post_name;
     57            $wpt_tabs[ = esc_attr( $prd->post_title );
     58            $wpt_tabs[ = esc_attr( $prd->menu_order );
     59            $wpt_tabs[]['conditions_category'] = get_post_meta( $prd->ID, '_wpt_conditions_category', true );
     60            $wpt_tabs[ = esc_attr( get_post_meta( $prd->ID, '_wpt_display_tab_globally', true ) );
    6161        }
    6262
     
    6565        if ( ! empty( $wpt_tabs ) ) {
    6666
    67             foreach ($wpt_tabs as $key => $tab) {
     67            foreach () {
    6868                $tab_temp             = array();
    6969                $tab_temp['title']    = $tab['title'];
    7070                $tab_temp['priority'] = $tab['priority'];
    7171                $tab_temp['callback'] = array( $this, 'callback' );
    72                 $tabs[$tab['id']]     = $tab_temp;
     72                $tabs[   = $tab_temp;
    7373            }
    7474
     
    7979    }
    8080
    81   public function tab_status_check( $tabs ){
    82 
    83     global $product;
    84 
    85     if ( ! empty( $tabs ) && is_array( $tabs ) ) {
    86 
    87       foreach ($tabs as $tab_key => $tab) {
    88         $key = $tab['id'];
    89 
    90         $tab_post = get_page_by_path( $key, OBJECT, 'woo_product_tab' );
    91 
    92         if ( ! empty( $tab_post ) ) {
    93           //
    94           $tab_default_value = $tab_post->post_content ;
    95 
    96           $content_to_show = $tab_default_value;
    97 
    98           if ( 'yes' === get_post_meta( $product->get_id(), '_wpt_override_' . $key, true ) ) {
     81{
     82
     83global $product;
     84
     85if ( ! empty( $tabs ) && is_array( $tabs ) ) {
     86
     87) {
     88$key = $tab['id'];
     89
     90$tab_post = get_page_by_path( $key, OBJECT, 'woo_product_tab' );
     91
     92if ( ! empty( $tab_post ) ) {
     93
     94;
     95
     96$content_to_show = $tab_default_value;
     97
     98if ( 'yes' === get_post_meta( $product->get_id(), '_wpt_override_' . $key, true ) ) {
    9999                        $tab_value = get_post_meta( $product->get_id(), '_wpt_field_' . $key, true );
    100100                        if ( ! empty( $tab_value ) ) {
     
    103103                    }
    104104
    105           if ( empty( $content_to_show ) ) {
    106             unset( $tabs[ $tab_key ] );
    107           }
    108 
    109           if ( ! empty( $tab['conditions_category'] ) && isset( $tabs[ $tab_key ] ) && $tab[ 'display_globally' ] === 'no' ) {
     105if ( empty( $content_to_show ) ) {
     106unset( $tabs[ $tab_key ] );
     107}
     108
     109] === 'no' ) {
    110110                        $child_categories = [];
    111                         foreach( $tab[ 'conditions_category' ] as $category ) {
     111                        foreach] as $category ) {
    112112                            $child_terms = get_terms( array(
    113                                 'child_of'              =>  $category,
    114                                 'hide_empty'            =>  true,
    115                                 'taxonomy'              =>  'product_cat',
    116                                 'fields'                    =>  'ids'
     113                                'child_of'$category,
     114                                'hide_empty'true,
     115                                'taxonomy''product_cat',
     116                                'fields''ids'
    117117                            ) );
    118118
    119                             if( is_array( $child_terms ) ) {
     119                            if( is_array( $child_terms ) ) {
    120120                                $child_categories = array_unique( array_merge( $child_categories, $child_terms ) );
    121121                            }
    122122                        }
    123123
    124                         $conditions_category = array_unique( array_merge( $tab[ 'conditions_category' ], $child_categories ) );
    125 
    126             // check category condition
    127             $cat_list = wp_get_post_terms( $product->get_id(), 'product_cat', array( 'fields' => 'ids' ) );
    128 
    129             if ( ! array_intersect( $cat_list, $conditions_category ) ) {
    130               unset( $tabs[ $tab_key ] );
    131             }
    132           }
    133         }
    134 
    135       } // end foreach
    136 
    137     }
    138     return $tabs;
    139 
    140   }
     124                        $conditions_category = array_unique( array_merge( $tab[], $child_categories ) );
     125
     126// check category condition
     127$cat_list = wp_get_post_terms( $product->get_id(), 'product_cat', array( 'fields' => 'ids' ) );
     128
     129if ( ! array_intersect( $cat_list, $conditions_category ) ) {
     130unset( $tabs[ $tab_key ] );
     131}
     132}
     133}
     134
     135} // end foreach
     136
     137}
     138return $tabs;
     139
     140}
    141141
    142142    public function callback( $key, $tab ) {
    143 
    144143        global $product;
    145144
     
    148147            return;
    149148        }
    150         $override_content = metadata_exists( 'post', $product->get_id(), '_wpt_field_' . $key );
     149
     150        $override_meta = get_post_meta( $product->get_id(), '_wpt_override_' . $key, true );
     151
     152        // The _wpt_override key doesn't exist in the older version of the plugin and the best way
     153        // to check it, is to check for the _wpt_field_ meta for the product
     154        if ( empty( $override_meta ) && get_post_meta( $product->get_id(), '_wpt_field_' . $key, true ) ) {
     155            $override_meta = 'yes';
     156        }
     157
     158        $override_content = ( 'yes' === $override_meta );
     159
    151160        if ( ! $override_content ) {
    152             // Default content for all
     161            // D
    153162            echo $this->get_filter_content( $tab_post->post_content );
    154163        } else {
     
    156165            echo $this->get_filter_content( $tab_value );
    157166        }
    158         return;
    159167    }
    160168
     
    162170     * Filter the tab content.
    163171     *
    164      * @since 2.0.2
    165      *
    166172     * @param string $content Content for the current tab.
    167173     * @return string Tab content.
     174
     175
    168176     */
    169     public function product_tabs_filter_content( $content ){
     177    public function product_tabs_filter_content( $content ){
    170178        $content = function_exists( 'capital_P_dangit' ) ? capital_P_dangit( $content ) : $content;
    171179        $content = function_exists( 'wptexturize' ) ? wptexturize( $content ) : $content;
     
    178186
    179187        if ( class_exists( 'WP_Embed' ) ) {
    180             $embed = new WP_Embed;
     188            $embed = new WP_Embed;
    181189            $content = method_exists( $embed, 'autoembed' ) ? $embed->autoembed( $content ) : $content;
    182190        }
     
    188196     * Get filter for the content.
    189197     *
    190      * @since 2.0.2
    191      *
    192198     * @param string $content Content to apply filter.
    193199     * @return string $content Tab content.
     200
     201
    194202     */
    195     public function get_filter_content( $content ){
     203    public function get_filter_content( $content ){
    196204        $use_the_content_filter = apply_filters( 'wpt_use_the_content_filter', true );
    197205
     
    211219    public function enable_the_content_filter() {
    212220        $disable_the_content_filter = get_option( 'wpt_disable_content_filter' );
    213         $output = false;
    214 
    215         if ( empty( $disable_the_content_filter ) ){
     221        $output = false;
     222
     223        if ( empty( $disable_the_content_filter ) ){
    216224            $disable_the_content_filter = 'no';
    217225        }
    218226
    219         if ( 'yes' === $disable_the_content_filter ){
     227        if ( 'yes' === $disable_the_content_filter ){
    220228            $output = true;
    221229        }
  • woocommerce-product-tabs/trunk/templates/product-tab-html.php

    r3019157 r3022582  
    2020            if ( 'yes' === $tab->_wpt_display_tab_globally ) {
    2121                $show = true;
    22             }
    23             else {
     22            } else {
    2423                if ( empty( $tab->_wpt_conditions_category ) ) {
    2524                    $show = true;
    2625                } else {
    27    
     26
    2827                    if ( ! empty( $tab->_wpt_conditions_category ) && is_array( $tab->_wpt_conditions_category ) && array_intersect( $cat_list, $tab->_wpt_conditions_category ) ) {
    2928                        $show = true;
     
    3736                unset( $tab );
    3837            } elseif ( defined( 'ICL_SITEPRESS_VERSION' ) && $lang !== $tab_lang['language_code'] ) {
    39                     unset( $tab );
     38                unset( $tab );
    4039            } else {
    4140
     
    5049                    'textarea_name' => '_wpt_field_' . $tab->post_name,
    5150                    'editor_height' => '150px',
    52                     'editor_class'  => 'test-class'
     51                    'editor_class'=> 'test-class'
    5352                ];
    5453                echo '<div class="tab-container hidden">';
    55                
     54
     55                $override_value = get_post_meta( $post_id, '_wpt_override_' . $tab->post_name, true );
     56
    5657                // The _wpt_override key doesn't exist in the older version of the plugin and the best way
    5758                // to check it, is to check for the _wpt_field_ meta for the product
    58                 if( get_post_meta( $post_id, '_wpt_override_' . $tab->post_name, true ) === 'yes' || metadata_exists( 'post', $post_id, '_wpt_field_' . $tab->post_name ) ) {
     59                ife ) ) {
    5960                    $override_value = 'yes';
    60                 } else {
    61                     $override_value = get_post_meta( $post_id, '_wpt_override_' . $tab->post_name, true ) ?? 'no';
     61                }
     62
     63                if ( empty( $override_value ) ) {
     64                    $override_value = 'no';
    6265                }
    6366
    6467                // Checking this option would enable the content
    6568                $args = array(
    66                     'label'                         => __( 'Override the default tab content for this product','woocommerce-product-tabs' ),
    67                     'id'                                => '_wpt_override_'. $tab->post_name,
    68                     'name'                          => '_wpt_override_'. $tab->post_name,
    69                     'class'                         => 'override-tab-content',
    70                     'wrapper_class'         => 'override-tab-content-label',
    71                     'value'                         => $override_value,
     69                    'label' 'woocommerce-product-tabs' ),
     70                    'id' . $tab->post_name,
     71                    'name'. $tab->post_name,
     72                    'class'=> 'override-tab-content',
     73                    'wrapper_class'=> 'override-tab-content-label',
     74                    'value'=> $override_value,
    7275                );
    7376                woocommerce_wp_checkbox( $args );
     
    7578                wp_editor( $tab_value, '_wpt_field_' . esc_attr( $tab->post_name ), $settings );
    7679                echo '<div class="edit-tab-product edit-tab-footer">';
    77         echo '<a class="edit-global-tab" target="_blank" href="'. get_edit_post_link( $tab->ID ) .'"><span class="dashicons dashicons-edit"></span> '. __( 'Manage global tab', 'woocommerce-product-tabs' ) .'</a>';
     80'</a>';
    7881                echo '</div></div><br />';
    7982            }
     
    99102        woocommerce_wp_textarea_input(
    100103            [
    101                 'label'       => '',
     104                'label' => '',
    102105                'id'    => 'hidden_duplicate_content',
    103106                'class' => 'tabs_content_field'
  • woocommerce-product-tabs/trunk/woocommerce-product-tabs.php

    r3019157 r3022582  
    11<?php
    22/**
     3
     4
    35 * @package   Barn2\woocommerce-product-tabs
    46 * @author    Barn2 Plugins <support@barn2.com>
     
    1012 * Plugin URI: https://barn2.com/wordpress-plugins/woocommerce-product-tabs/
    1113 * Description: Boost your product pages by adding custom tabs containing extra information.
    12  * Version: 2.1.0
     14 * Version: 2.1.0
    1315 * Author: Barn2 Plugins
    1416 * Author URI: https://barn2.com
     
    1921 * Tested up to: 6.4.2
    2022 * WC requires at least: 6.5
    21  * WC tested up to: 8.4.0
    22  * 
     23 * WC tested up to: 8.
     24 *
    2325 * Copyright:       Barn2 Media Ltd
    2426 * License:         GNU General Public License v3.0
    2527 * License URI:     https://www.gnu.org/licenses/gpl.html
    26  *
    2728 */
    2829
     
    3435}
    3536
    36 const PLUGIN_VERSION = '2.1.0';
     37const PLUGIN_VERSION = '2.1.0';
    3738const PLUGIN_FILE    = __FILE__;
    3839
Note: See TracChangeset for help on using the changeset viewer.