Skip to content

Instantly share code, notes, and snippets.

@mustardBees
Last active December 10, 2015 12:28
Show Gist options
  • Select an option

  • Save mustardBees/4434372 to your computer and use it in GitHub Desktop.

Select an option

Save mustardBees/4434372 to your computer and use it in GitHub Desktop.
Replace the WooCommerce registration function
/**
* 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