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,9 +642,11 @@ function woocommerce_order_totals_meta_box($post) {
if ( $woocommerce->payment_gateways ) {
foreach ( $woocommerce->payment_gateways->payment_gateways() as $gateway ) {
echo '<option value="' . $gateway->id . '" ' . selected( $chosen_method, $gateway->id, false ) . '>' . $gateway->get_title() . '</option>';
if ( $chosen_method == $gateway->id )
if($gateway->enabled =="yes"){
echo '<option value="' . $gateway->id . '" ' . selected( $chosen_method, $gateway->id, false ) . '>' . $gateway->get_title() . '</option>';
if ( $chosen_method == $gateway->id )
$found_method = true;
}
}
}