Skip to content

Instantly share code, notes, and snippets.

@sarangs07
Last active April 30, 2020 06:29
Show Gist options
  • Save sarangs07/1961757da99aec45bee7c2629eb097d9 to your computer and use it in GitHub Desktop.
Save sarangs07/1961757da99aec45bee7c2629eb097d9 to your computer and use it in GitHub Desktop.
Remove Avada Theme's conflict
/* Please add the below CSS into your customizer -> Under Additional CSS */
body.cartflows_step-template-default:not(.avada-woo-one-page-checkout) .woocommerce form.checkout #order_review,
body.cartflows_step-template-default:not(.avada-woo-one-page-checkout) .woocommerce form.checkout #order_review_heading,
body.cartflows_step-template-default:not(.avada-woo-one-page-checkout) .woocommerce form.checkout .col-2{
display:block;
}
/*
* How to add the custome code.
*
* Please follow below instructions:
* 1. Copy the below code.
* 2. Open your child theme's functions.php file.
* 3. Paste the copied code at the very bottom of it & save the file OR upload it on your server/hosting.
*/
add_action( 'wp', 'remove_avada_conflict_actions' );
function remove_avada_conflict_actions(){
$post_type = get_post_type();
global $avada_woocommerce;
if( 'cartflows_step' == $post_type ){
remove_action( 'woocommerce_before_account_navigation', array ( $avada_woocommerce, 'avada_top_user_container' ), 10 );
remove_action( 'woocommerce_before_checkout_form', array ( $avada_woocommerce, 'avada_top_user_container' ), 1 );
remove_action( 'woocommerce_before_checkout_form', array( $avada_woocommerce, 'before_checkout_form' ) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment