Last active
December 10, 2015 12:28
-
-
Save mustardBees/4434372 to your computer and use it in GitHub Desktop.
Replace the WooCommerce registration function
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
| /** | |
| * Custom WooCommerce registration process | |
| */ | |
| function iweb_woocommerce_process_registration() { | |
| // Duplicate of woocommerce_process_registration() with our modifications | |
| } | |
| /** | |
| * Replace the WooCommerce registration function | |
| * | |
| * Remove the action during plugins_loaded to ensure that it has definitely | |
| * been added before we try and remove it. | |
| * | |
| * @author Rob Holmes | |
| * @link http://goo.gl/UWfbB | |
| */ | |
| function iweb_replace_woocommerce_process_registration() { | |
| remove_action( 'init', 'woocommerce_process_registration' ); | |
| add_action( 'init', 'iweb_woocommerce_process_registration' ); | |
| } | |
| add_action( 'plugins_loaded', 'iweb_replace_woocommerce_process_registration' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment