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 | |
| /** | |
| * New order email | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) { | |
| exit; | |
| } | |
| // allowed tags for escaping | |
| $allowed_tags = array( | 
  
    
      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_filter( 'get_terms', 'get_subcategory_terms', 10, 3 ); | |
| function get_subcategory_terms( $terms, $taxonomies, $args ) { | |
| $new_terms = array(); | |
| // if a product category and on the shop page | |
| // to hide from shop page, replace is_page('YOUR_PAGE_SLUG') with is_shop() | |
| if ( in_array( 'product_cat', $taxonomies ) && ! is_admin() && is_page('YOUR_PAGE_SLUG') ) { | |
| foreach ( $terms as $key => $term ) { | |
| if ( ! in_array( $term->slug, array( 'woo' ) ) ) { | |
| $new_terms[] = $term; | 
  
    
      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_filter( 'woocommerce_no_shipping_available_html', 'my_custom_no_shipping_message' ); | |
| add_filter( 'woocommerce_cart_no_shipping_available_html', 'my_custom_no_shipping_message' ); | |
| function my_custom_no_shipping_message( $message ) { | |
| return __( 'your_custom_message_goes_here' ); | |
| } | 
  
    
      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
    
  
  
    
  | remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10 ); | 
  
    
      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_filter( 'wc_add_to_cart_message', '__return_empty_string' ); | 
  
    
      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
    
  
  
    
  | remove_action( 'woocommerce_order_details_after_order_table', 'woocommerce_order_again_button' ); | |
| //Did this help? Donate me some BTC: 1BEsm8VMkYhSFJ92cvUYwxCtsfsB2rBfiG | 
  
    
      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_filter('manage_edit-shop_order_columns', 'wc_custom_purchased_column'); | |
| function wc_custom_purchased_column($columns) | |
| { | |
| $new_array = array(); | |
| foreach ($columns as $key => $title) { | |
| if ($key == 'billing_address') { | |
| $new_array['order_items'] = __('Purchased', 'woocommerce'); | |
| } | 
  
    
      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 my_wc_custom_get_price_html( $price, $product ) { | |
| if ( $product->get_price() == 0 ) { | |
| if ( $product->is_on_sale() && $product->get_regular_price() ) { | |
| $regular_price = wc_get_price_to_display( $product, array( 'qty' => 1, 'price' => $product->get_regular_price() ) ); | |
| $price = wc_format_price_range( $regular_price, __( 'Free!', 'woocommerce' ) ); | |
| } else { | |
| $price = '<span class="amount">' . __( 'Free!', 'woocommerce' ) . '</span>'; | |
| } | |
| } | 
  
    
      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_action( 'after_setup_theme', 'remove_pgz_theme_support', 100 ); | |
| function remove_pgz_theme_support() { | |
| remove_theme_support( 'wc-product-gallery-zoom' ); | |
| } |