diff --git a/includes/class-wc-gzd-payment-gateways.php b/includes/class-wc-gzd-payment-gateways.php index bcbd182f1..9b2be5a55 100644 --- a/includes/class-wc-gzd-payment-gateways.php +++ b/includes/class-wc-gzd-payment-gateways.php @@ -119,7 +119,9 @@ public function gateway_supports_fees( $id ) { } protected function maybe_force_gateway_button_text( $gateway ) { - if ( ! isset( $gateway->force_order_button_text ) || $gateway->force_order_button_text ) { + $button_text = $gateway->order_button_text; + + if ( ! is_null( $button_text ) && ! empty( $button_text ) && ( ! isset( $gateway->force_order_button_text ) || $gateway->force_order_button_text ) ) { /** * Filter to adjust the forced order submit button text per gateway. * By default Woo allows gateways to adjust the submit button text. @@ -144,7 +146,6 @@ public function manipulate_gateways() { $gateways = WC()->payment_gateways()->payment_gateways(); foreach ( $gateways as $gateway ) { - if ( 'yes' !== $gateway->enabled ) { continue; } @@ -153,7 +154,6 @@ public function manipulate_gateways() { $this->maybe_force_gateway_button_text( $gateway ); if ( $this->gateway_supports_fees( $gateway->id ) && $gateway->get_option( 'fee' ) ) { - $gateway_description = $this->gateway_data[ $gateway->id ]['description']; $desc = sprintf( __( '%s payment charge', 'woocommerce-germanized' ), wc_price( $gateway->get_option( 'fee' ) ) ) . '.'; @@ -171,7 +171,6 @@ public function manipulate_gateways() { * */ $gateway_description .= apply_filters( 'woocommerce_gzd_payment_gateway_description', ' ' . $desc, $gateway ); - $gateway->description = $gateway_description; } } diff --git a/includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php b/includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php index 11273dd74..49e5e8f29 100644 --- a/includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php +++ b/includes/gateways/direct-debit/class-wc-gzd-gateway-direct-debit.php @@ -20,6 +20,8 @@ class WC_GZD_Gateway_Direct_Debit extends WC_Payment_Gateway { protected $enable_pre_notification; + protected $instructions; + protected $debit_days; protected $generate_mandate_id;