public static function init()
{
add_filter('post_type_link', array(__CLASS__, 'variation_post_link'), 10, 2);
add_action('woocommerce_deferred_product_sync', array(__CLASS__, 'deferred_product_sync'), 10, 1);
add_action('set_object_terms', array(__CLASS__, 'set_object_terms'), 10, 6);
add_action('transition_post_status', array(__CLASS__, 'transition_post_status'), 10, 3);
add_action('woocommerce_product_set_stock_status', array(__CLASS__, 'delete_product_query_transients'));
add_action('woocommerce_product_set_visibility', array(__CLASS__, 'delete_product_query_transients'));
add_action('edit_term', array(__CLASS__, 'edit_term'), 10, 3);
add_action('edited_term', array(__CLASS__, 'edited_term'), 10, 3);
add_filter('update_order_item_metadata', array(__CLASS__, 'update_order_item_metadata'), 10, 5);
add_filter('update_post_metadata', array(__CLASS__, 'update_post_metadata'), 10, 5);
add_filter('wp_insert_post_data', array(__CLASS__, 'wp_insert_post_data'));
// Status transitions
add_action('delete_post', array(__CLASS__, 'delete_post'));
add_action('wp_trash_post', array(__CLASS__, 'trash_post'));
add_action('untrashed_post', array(__CLASS__, 'untrash_post'));
add_action('before_delete_post', array(__CLASS__, 'delete_order_items'));
add_action('before_delete_post', array(__CLASS__, 'delete_order_downloadable_permissions'));
// Download permissions
add_action('woocommerce_process_product_file_download_paths', array(__CLASS__, 'process_product_file_download_paths'), 10, 3);
}