Plugin Directory

Changeset 2746060


Ignore:
Timestamp:
06/21/2022 08:06:54 PM (4 years ago)
Author:
yikesinc
Message:

Update to version 1.7.8 from GitHub

Location:
yikes-inc-easy-custom-woocommerce-product-tabs
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • yikes-inc-easy-custom-woocommerce-product-tabs/tags/1.7.8/admin/class.settings.php

    r2384504 r2746060  
    9090                'methods'  => 'POST',
    9191                'callback' => array( $this, 'rest_response' ),
    92                 'permission_callback' => '__return_true'
     92                'permission_callback' => array( $this, 'permission_callback' )
    9393            )
    9494        );
     
    113113
    114114        return $response;
     115    }
     116
     117    /**
     118     * Only allow admins to modify the content setting.
     119     *
     120     * @return bool
     121     */
     122    public function permission_callback(){
     123       return current_user_can( 'manage_options' );
    115124    }
    116125
  • yikes-inc-easy-custom-woocommerce-product-tabs/tags/1.7.8/public/class.yikes-woo-tabs-display.php

    r2260682 r2746060  
    3737         */
    3838        public function add_custom_product_tabs( $tabs ) {
    39             global $product;
     39            $product = wc_get_product();
     40
     41            if ( empty( $product ) ) {
     42                return $tabs;
     43            }
    4044
    4145            $product_id = method_exists( $product, 'get_id' ) === true ? $product->get_id() : $product->ID;
  • yikes-inc-easy-custom-woocommerce-product-tabs/tags/1.7.8/readme.txt

    r2734897 r2746060  
    55Requires at least: 3.8
    66Tested up to: 6.0
    7 Stable tag: 1.7.7
     7Stable tag: 1.7.8
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7575
    7676== Changelog ==
     77
     78= 1.7.8 - June 21st, 2022 =
     79* Address minor vulnerability
     80* Fix issue related to Divi Builder
    7781
    7882= 1.7.7 - March 8th, 2021 =
  • yikes-inc-easy-custom-woocommerce-product-tabs/trunk/admin/class.settings.php

    r2384504 r2746060  
    9090                'methods'  => 'POST',
    9191                'callback' => array( $this, 'rest_response' ),
    92                 'permission_callback' => '__return_true'
     92                'permission_callback' => array( $this, 'permission_callback' )
    9393            )
    9494        );
     
    113113
    114114        return $response;
     115    }
     116
     117    /**
     118     * Only allow admins to modify the content setting.
     119     *
     120     * @return bool
     121     */
     122    public function permission_callback(){
     123       return current_user_can( 'manage_options' );
    115124    }
    116125
  • yikes-inc-easy-custom-woocommerce-product-tabs/trunk/public/class.yikes-woo-tabs-display.php

    r2260682 r2746060  
    3737         */
    3838        public function add_custom_product_tabs( $tabs ) {
    39             global $product;
     39            $product = wc_get_product();
     40
     41            if ( empty( $product ) ) {
     42                return $tabs;
     43            }
    4044
    4145            $product_id = method_exists( $product, 'get_id' ) === true ? $product->get_id() : $product->ID;
  • yikes-inc-easy-custom-woocommerce-product-tabs/trunk/readme.txt

    r2734897 r2746060  
    55Requires at least: 3.8
    66Tested up to: 6.0
    7 Stable tag: 1.7.7
     7Stable tag: 1.7.8
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7575
    7676== Changelog ==
     77
     78= 1.7.8 - June 21st, 2022 =
     79* Address minor vulnerability
     80* Fix issue related to Divi Builder
    7781
    7882= 1.7.7 - March 8th, 2021 =
Note: See TracChangeset for help on using the changeset viewer.