Plugin Directory

Changeset 2073012


Ignore:
Timestamp:
04/23/2019 09:08:17 AM (7 years ago)
Author:
woofx
Message:

Bugfix/ paid markup

Location:
local-shipping-labels-for-woocommerce/trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • local-shipping-labels-for-woocommerce/trunk/admin/Main.php

    r2068712 r2073012  
    272272        // prepare amount
    273273        $amount_html = "Amount: {$order->get_currency()} {$order->get_total()}";
    274         if(in_array($order->get_payment_method_title(),$_options_mark_as_paid)){
    275             $amount .= " (Paid)";
     274        $_method = $order->get_payment_method();
     275        if( isset($_options_mark_as_paid[$_method]) && $_options_mark_as_paid[$_method] == 1 ){
     276            $amount_html .= " <strong>(PAID)</strong>";
    276277        }
    277278        $amount_html .= "<br>";
  • local-shipping-labels-for-woocommerce/trunk/admin/Settings.php

    r2068712 r2073012  
    133133            foreach( $available_payment_methods as $method ) {
    134134                $html .= sprintf('<input type="checkbox" id="%s" name="%s[%s]" value="1" %s />',
    135                     $method->method_title,
     135                    $method->id,
    136136                    $option_name,
    137                     $method->method_title,
    138                     checked( 1, @$options[$method->method_title], false )
     137                    $method->id,
     138                    checked( 1, @$options[$method->id], false )
    139139                );
    140140
    141                 $html .= '<label for="'.$method->method_title.'">'.$method->method_title.'</label><br>';
     141                $html .= '<label for="'.$method->id.'">'.$method->title.'</label><br>';
    142142            }
    143143
Note: See TracChangeset for help on using the changeset viewer.