I've overwritten WooCommerce's review-order.php
to change the checkout a little bit. Now everytime I add something to the hook woocommerce_review_order_after_order_total
the contents get displayed twice and before the whole block and NOT AFTER the order total:
function output_payment_button() {
$order_button_text = apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) );
echo '<input type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '" />';
}
add_action( 'woocommerce_review_order_after_order_total', 'output_payment_button' );
Also adding a simple <?php echo("Hello World"); ?>
to the end of review-order.php
makes it appear twice. Can someone explain to me what I am doing wrong?
return
instead ofecho