Skip to content

Instantly share code, notes, and snippets.

@dennisnissle
Last active January 2, 2023 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dennisnissle/8d5ca804fcdc3c33ff75db841b75b3c5 to your computer and use it in GitHub Desktop.
Save dennisnissle/8d5ca804fcdc3c33ff75db841b75b3c5 to your computer and use it in GitHub Desktop.
Switch payment and order wrap within Germanized checkout
<?php
add_action( 'after_setup_theme', 'my_child_adjust_checkout', 1000 );
function my_child_adjust_checkout() {
remove_action( 'woocommerce_checkout_order_review', 'woocommerce_order_review', 20 );
remove_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 10 );
add_action( 'woocommerce_checkout_order_review', 'woocommerce_order_review', 10 );
add_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 );
}
add_filter( 'woocommerce_gzd_insert_order_submit_fallback', '__return_false' );
add_filter( 'wc_gzd_checkout_params', 'my_child_prevent_gzd_checkout_heading_switch', 10 );
function my_child_prevent_gzd_checkout_heading_switch( $params ) {
$params['adjust_heading'] = false;
return $params;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment