| @@ 47-55 (lines=9) @@ | ||
| 44 | '' => __( 'Checkout Options', 'woocommerce' ) |
|
| 45 | ); |
|
| 46 | ||
| 47 | if ( ! defined( 'WC_INSTALLING' ) ) { |
|
| 48 | // Load shipping methods so we can show any global options they may have. |
|
| 49 | $payment_gateways = WC()->payment_gateways->payment_gateways(); |
|
| 50 | ||
| 51 | foreach ( $payment_gateways as $gateway ) { |
|
| 52 | $title = empty( $gateway->method_title ) ? ucfirst( $gateway->id ) : $gateway->method_title; |
|
| 53 | $sections[ strtolower( $gateway->id ) ] = esc_html( $title ); |
|
| 54 | } |
|
| 55 | } |
|
| 56 | ||
| 57 | return apply_filters( 'woocommerce_get_sections_' . $this->id, $sections ); |
|
| 58 | } |
|
| @@ 53-64 (lines=12) @@ | ||
| 50 | 'classes' => __( 'Shipping Classes', 'woocommerce' ) |
|
| 51 | ); |
|
| 52 | ||
| 53 | if ( ! defined( 'WC_INSTALLING' ) ) { |
|
| 54 | // Load shipping methods so we can show any global options they may have |
|
| 55 | $shipping_methods = WC()->shipping->load_shipping_methods(); |
|
| 56 | ||
| 57 | foreach ( $shipping_methods as $method ) { |
|
| 58 | if ( ! $method->has_settings() ) { |
|
| 59 | continue; |
|
| 60 | } |
|
| 61 | $title = empty( $method->method_title ) ? ucfirst( $method->id ) : $method->method_title; |
|
| 62 | $sections[ strtolower( $method->id ) ] = esc_html( $title ); |
|
| 63 | } |
|
| 64 | } |
|
| 65 | ||
| 66 | return apply_filters( 'woocommerce_get_sections_' . $this->id, $sections ); |
|
| 67 | } |
|