Plugin Directory

Changeset 3046679


Ignore:
Timestamp:
03/07/2024 03:10:53 AM (2 years ago)
Author:
hemthapa
Message:

WP support upto v6.4.3 added

Location:
woocom-disable-download-function/tags/1.002
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • woocom-disable-download-function/tags/1.002/readme.txt

    r2958549 r3046679  
    55Requires at least: 4.0
    66Requires PHP: 7.0
    7 Tested up to: 6.3
     7Tested up to: 6.4.3
    88Stable tag: 1.002
    9 WC tested up to: 8.0.2
     9WC tested up to: 8.6.1
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • woocom-disable-download-function/tags/1.002/woocom-disable-download-menu.php

    r2958549 r3046679  
    77 * Author: Hem Thapa
    88 * Author URI: https://hemthapa.com/
    9  * WC tested up to: 8.0.2
     9 * WC tested up to: 8.6.1
    1010 */
    1111
    12 function woocom_disable_download_menu($items){
    13     unset( $items['downloads'] );
     12
     13/**
     14 * Declaring extension (in)compatibility with High-Performance Order Storage
     15 */
     16add_action('before_woocommerce_init', function () {
     17    if (class_exists(\Automattic\WooCommerce\Utilities\FeaturesUtil::class)) {
     18        \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', __FILE__, true);
     19    }
     20});
     21
     22/**
     23 * Disable download menu
     24 */
     25function woocom_disable_download_menu($items)
     26{
     27    unset($items['downloads']);
    1428    return $items;
    1529}
    1630add_filter('woocommerce_account_menu_items', 'woocom_disable_download_menu', 10, 1);
    17 
    18 ?>
Note: See TracChangeset for help on using the changeset viewer.