Created
          September 12, 2014 06:28 
        
      - 
      
- 
        Save rayflores/38d0a0c0af8d022cfd00 to your computer and use it in GitHub Desktop. 
    Remove filters from Shipment Tracking plugin class
  
        
  
    
      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 | |
| function remove_filters_from_shipping_class( ) { | |
| if (class_exists('WC_Shipment_Tracking')) { | |
| global $WC_Shipment_Tracking; //globalize class from another plugin | |
| // filters from WC_Shipment_Tracking class - which add the tracking info into the exporter class - needed to remove entire filters | |
| remove_filter( 'wc_customer_order_csv_export_order_headers', array( &$WC_Shipment_Tracking, 'add_tracking_info_to_csv_export_column_headers' ) ); | |
| remove_filter( 'wc_customer_order_csv_export_order_row', array( &$WC_Shipment_Tracking, 'add_tracking_info_to_csv_export_column_data' ), 10, 3 ); | |
| } | |
| } | |
| add_action('plugins_loaded','remove_filters_from_shipping_class'); // after shipment-tracking plugin has loaded | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment