Update admin/post-types/writepanels/writepanel-order_data.php

Display only active gateways
This commit is contained in:
Michael Pauluzzi 2012-10-12 15:17:43 +03:00
parent 20d7e9b54f
commit 6406d9369b
1 changed files with 4 additions and 2 deletions

View File

@ -642,11 +642,13 @@ function woocommerce_order_totals_meta_box($post) {
if ( $woocommerce->payment_gateways ) { if ( $woocommerce->payment_gateways ) {
foreach ( $woocommerce->payment_gateways->payment_gateways() as $gateway ) { foreach ( $woocommerce->payment_gateways->payment_gateways() as $gateway ) {
if($gateway->enabled =="yes"){
echo '<option value="' . $gateway->id . '" ' . selected( $chosen_method, $gateway->id, false ) . '>' . $gateway->get_title() . '</option>'; echo '<option value="' . $gateway->id . '" ' . selected( $chosen_method, $gateway->id, false ) . '>' . $gateway->get_title() . '</option>';
if ( $chosen_method == $gateway->id ) if ( $chosen_method == $gateway->id )
$found_method = true; $found_method = true;
} }
} }
}
if ( ! $found_method && ! empty( $chosen_method ) ) { if ( ! $found_method && ! empty( $chosen_method ) ) {
echo '<option value="' . $chosen_method . '" selected="selected">' . __( 'Other', 'woocommerce' ) . '</option>'; echo '<option value="' . $chosen_method . '" selected="selected">' . __( 'Other', 'woocommerce' ) . '</option>';