This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: WooPAM: Woo Product Attributes Modifier | |
| * Description: Bulk update 'custom meta product attributes' to 'taxonomy product attributes' in WooCommerce. Supports the GET variables, like: woopam_mode=run&woopam_from_attribute_meta=colour&woopam_to_attribute_tax=pa_colour&woopam_keep_attribute_meta&woopam_posts_per_page=10&woopam_paged=0&woopam_post_type=product&woopam_post_status=any. WARNING: Backup DB first!!! | |
| * Plugin Author: birgire | |
| * Author URI: https://github.com/birgire | |
| * Plugin URI: https://gist.github.com/birgire/0ed300ae4436fcaf508c | |
| * Version: 1.0.0 | |
| * License: GPL2+ | |
| * Text Domain: woopam |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Add this to your functions.php in wordpress theme folder: | |
| add_action( 'wp_enqueue_scripts', 'gallery_scripts', 20 ); | |
| function gallery_scripts() { | |
| if ( is_archive()) { | |
| if ( current_theme_supports( 'wc-product-gallery-zoom' ) ) { | |
| wp_enqueue_script( 'zoom' ); | |
| } | |
| if ( current_theme_supports( 'wc-product-gallery-slider' ) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * After adding this code to theme functions.php, ensure you clear transients via WC > System Status > Tools | |
| */ | |
| add_filter( 'woocommerce_get_sale_price', '__return_empty_string' ); | |
| add_filter( 'woocommerce_variation_prices_sale_price', '__return_empty_string' ); | |
| add_filter( 'woocommerce_variation_prices_price', 'custom_get_price', 10, 2 ); | |
| add_filter( 'woocommerce_get_price', 'custom_get_price', 10, 2 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function disable_elementor_dashboard_overview_widget() { | |
| remove_meta_box( 'e-dashboard-overview', 'dashboard', 'normal'); | |
| } | |
| add_action('wp_dashboard_setup', 'disable_elementor_dashboard_overview_widget', 40); |