Changeset 2462069
- Timestamp:
- 01/25/2021 07:49:22 AM (5 years ago)
- Location:
- woo-pelecard-gateway/trunk
- Files:
-
- 5 edited
-
includes/Gateway.php (modified) (5 diffs)
-
includes/Plugin.php (modified) (1 diff)
-
includes/Settings.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
woocommerce-pelecard-gateway.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
woo-pelecard-gateway/trunk/includes/Gateway.php
r2460563 r2462069 10 10 use WC_Subscription; 11 11 use WC_Subscriptions_Cart; 12 use WCML_WC_Gateways;13 12 14 13 /** … … 76 75 $option = parent::get_option( $key, $empty_value ); 77 76 78 if ( function_exists( 'wpml_translate_single_string_filter') ) {77 if ( $this->is_wcml_active() ) { 79 78 $option = wpml_translate_single_string_filter( 80 79 $option, 81 WCML_WC_Gateways::STRINGS_CONTEXT,80 \WCML_WC_Gateways::STRINGS_CONTEXT, 82 81 $this->id . '_gateway_' . $key, 83 82 $this->current_language … … 200 199 201 200 /** 201 * @return bool 202 */ 203 public function is_wcml_active() { 204 return function_exists( 'wpml_translate_single_string_filter' ) && class_exists( '\WCML_WC_Gateways' ); 205 } 206 207 /** 202 208 * @param $field 203 209 * … … 313 319 314 320 /** 321 * @todo: support the `payment_range` field type. 322 * 315 323 * @param $text_keys 316 324 * … … 320 328 if ( isset( $_REQUEST['section'] ) && $this->id === $_REQUEST['section'] ) { 321 329 $form_fields = array_filter( $this->form_fields, function( $setting ) { 322 return 'title' !== $setting['type'];330 return ! in_array( $setting['type'], [ 'title', 'payment_range' ] ); 323 331 } ); 324 332 -
woo-pelecard-gateway/trunk/includes/Plugin.php
r2460563 r2462069 18 18 * @var string $version 19 19 */ 20 public static $version = '1.4 ';20 public static $version = '1.4.1'; 21 21 22 22 /** -
woo-pelecard-gateway/trunk/includes/Settings.php
r2460563 r2462069 418 418 419 419 $field_key = $gateway->get_field_key( $field ); 420 $ranges = array_filter( (array) $gateway->get_option( $field, [] ) ); 420 421 ?> 421 422 <tr valign="top"> … … 434 435 </thead> 435 436 <tbody class="ranges"> 436 <?php foreach ( $ gateway->get_option( $field, [] )as $i => $range ): ?>437 <?php foreach ( $ranges as $i => $range ): ?> 437 438 <tr class="range"> 438 439 <td class="sort"></td> -
woo-pelecard-gateway/trunk/readme.txt
r2460563 r2462069 4 4 Requires at least: 5.3 5 5 Tested up to: 5.6 6 Stable tag: 1.4 6 Stable tag: 1.4.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 55 55 56 56 == Changelog == 57 58 = 1.4.1 = 59 * Fixed WPML/WCML integration. 57 60 58 61 = 1.4 = -
woo-pelecard-gateway/trunk/woocommerce-pelecard-gateway.php
r2460564 r2462069 4 4 * Plugin URI: https://wordpress.org/plugins/woo-pelecard-gateway/ 5 5 * Description: Extends WooCommerce with Pelecard payment gateway. 6 * Version: 1.4 6 * Version: 1.4.1 7 7 * Author: Ido Friedlander 8 8 * Author URI: https://profiles.wordpress.org/idofri/
Note: See TracChangeset
for help on using the changeset viewer.