Changeset 3046679
- Timestamp:
- 03/07/2024 03:10:53 AM (2 years ago)
- Location:
- woocom-disable-download-function/tags/1.002
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
woocom-disable-download-menu.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
woocom-disable-download-function/tags/1.002/readme.txt
r2958549 r3046679 5 5 Requires at least: 4.0 6 6 Requires PHP: 7.0 7 Tested up to: 6. 37 Tested up to: 6.4.3 8 8 Stable tag: 1.002 9 WC tested up to: 8. 0.29 WC tested up to: 8.6.1 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
woocom-disable-download-function/tags/1.002/woocom-disable-download-menu.php
r2958549 r3046679 7 7 * Author: Hem Thapa 8 8 * Author URI: https://hemthapa.com/ 9 * WC tested up to: 8. 0.29 * WC tested up to: 8.6.1 10 10 */ 11 11 12 function woocom_disable_download_menu($items){ 13 unset( $items['downloads'] ); 12 13 /** 14 * Declaring extension (in)compatibility with High-Performance Order Storage 15 */ 16 add_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 */ 25 function woocom_disable_download_menu($items) 26 { 27 unset($items['downloads']); 14 28 return $items; 15 29 } 16 30 add_filter('woocommerce_account_menu_items', 'woocom_disable_download_menu', 10, 1); 17 18 ?>
Note: See TracChangeset
for help on using the changeset viewer.