Solved it. I used the plugins_loaded hook, like this:
add_action('plugins_loaded','example_function');
function example_function(){
remove_action('manage_shop_order_posts_custom_column', 'woocommerce_custom_order_columns', 2);
add_action('manage_shop_order_posts_custom_column', 'match_order_woocommerce_custom_order_columns', 2);
}
Related Posts:
- Passing a parameter to filter and action functions
- Get a list of all registered actions
- How can I edit post data before it is saved?
- Auto Load Plugin Hooks inside Must Use Plugin
- How to only hook on Single.php after content?
- How can I log a user out of WordPress before the page loads?
- What is the ‘admin_action_’ . $_REQUEST[‘action’] hook used for?
- Autogenerate wordpress shortcodes using array?
- Enqueue style inside shortcode but its loaded at the bottom of page (before footer scripts)
- How can I limit functionality in one version of a plugin?
- Is there a global action for when a plugin is uninstalled?
- Shortcode display outside the div
- Good tools for locating hooks in a wordpress page/admin interface/blog post?
- How to remove action from plugin?
- Very stubborn wp_register_script / add_action vs remove
- How to prepend to the_title for admin-side plugin’s use
- do_action and hook methods
- Is it possible to add an action to the currently running action?
- Is there an action that is called when a post is restored from the trash?
- How to filter content post only on save
- Filter or action hook to insert content on admin pages before tag
- Action on post publish
- How to add inline css/js inside a shortcode
- How to prevent action in ajax request, when in admin side?
- What is the purpose of $merged_filters?
- template_redirect not being called when using ajax
- add action wp_head not working
- Can I use a method from an existing plugin as an action hook?
- Plugin custom Action Hook not working
- What are the benefit in adding hook in the init() hook?
- Detect when any plugin is activated or deactivated
- Where to hook my plugin’s action
- Overwrite or Replace code in WP_Footer
- How do action and filter hooks understand where to look for the core function that we hooked our function to them
- Get posts from WP_Query and format them on admin_head
- Automatically add attributes to woocommerce product?
- Any hook for pre-plugin-update -either bulk or single plugin update
- wordpress plugin is not activating from widget
- When to load auto-login code?
- How to get all of the activate_plugin action parameters?
- Get Time Taken By Each Action Hook in WordPress
- Are functions in main plugin file called before function bound to register_activation_hook runs?
- Removing an action from wp_footer called in a class that’s inside a bigger class
- WordPress user account activation
- External Script Using WP – Hooks / Actions Not Working?
- Submit custom form from post content and execute in plugin
- Inject HTML meta tag inside wordpress tag using add_shortcode
- How to get post ID with hooks publish_post, new_to_publish, etc
- register_activation_hook in oop approach
- do add_action on condition
- Is there a way to figure out which action/filter invoked a function?
- How to trace SUBMIT button
- How passing values to construct function with Actions?
- Remove_action from plugin with a Class
- add_action into another add_action not working
- publish_post action doesn’t work
- the_post hook is not firing for me
- Does using `add_action( ‘init’…` cause performance issues?
- do_action Nested List
- Plugin Development – Functions or Hooks?
- Basic function call on init failing
- How to create Admin Notice from Plugin with argument? [duplicate]
- Editing wp-config.php
- Are there action hooks for comments?
- New bulk action to resend welcome emails
- WooCommerce: after install hook
- Dequeue, Unregister, Remove Action – Not Working on Plugin
- Add action to custom Function
- override function from my plugin [closed]
- How to append new form elements in “Add New” form of Users in WordPress admin panel?
- Hook from plugin doesn’t fire up from external PHP script
- update_option_{$option} not working (do function after options are saved)
- The function called on the wp head hook becomes null
- i create functions.php in plugin files but add_action (‘wp_head’, ‘function_name’) don’t work
- Hooking into the HTML header container
- How to Unhook actions/filters in within Class in plugin
- WPML – Hook when language is switched (change user language)
- Nested Actions and Filters
- Use action, filter, or hook to append HTML to WordPress plugin function
- Passing function into add_action always returns the first argument
- Remove action added in plugin class from theme
- {status}_{post_type} does not run correctly?
- Change hook to add_action in a plugin class
- echo plugin results on pages
- How to get bulk actions handler to display simple “Hello World”?
- Why is WP template_include overwritting all templates rather than specified page?
- What action/hook do I need to register to have my plugin handle front-end editing?
- Why can’t I shove an instance of a class into a variable from a do_action hook?
- wp_login_form() ignoring login_form action hook
- Passing a parameter to filter and action functions
- Plugin Hook: Get posts
- Action hook “wp_insert_post” works but not for last imported post
- Is it possible to cancel a post status transition?
- Problem with executing a function on saving a post
- OOP Plugin: Where should I place the action hooks in the class?
- Call a function with href
- Which action/filter can i use for a Member Plugin [closed]
- add_action() not working for admin
- Add custom button to the changeset status in the Customizer
- How to customize WP_Error (REST JWT authentication plugin) [closed]