Skip to content

Commit a9ee7be

Browse files
Fix new payment gateway ID change to settings.
1 parent 5232163 commit a9ee7be

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

includes/core/class-rfw-payment-gateway.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public function maybe_disable( $available_gateways ) {
184184
if ( RFW_Data::is_backorder_pay_disabled() ) {
185185
foreach ( WC()->cart->get_cart() as $cart_item ) {
186186
if ( $cart_item['data']->is_on_backorder( $cart_item['quantity'] ) ) {
187-
unset( $available_gateways['resolve'] );
187+
unset( $available_gateways[ RFW_PLUGIN_ID ] );
188188
break;
189189
}
190190
}
@@ -198,7 +198,7 @@ public function maybe_disable( $available_gateways ) {
198198
$total = (float) WC()->cart->get_total( 'raw' );
199199

200200
if ( ( $order_min && $total < $order_min ) || ( $order_max && $total > $order_max ) ) {
201-
unset( $available_gateways['resolve'] );
201+
unset( $available_gateways[ RFW_PLUGIN_ID ] );
202202
}
203203
}
204204

@@ -312,9 +312,8 @@ public function process_capture( $post_id ) {
312312
return;
313313
}
314314

315-
// is the capture button clicked?
315+
// Is the capture button clicked?
316316
if ( (string) filter_input( INPUT_POST, 'rfw_capture_payment', FILTER_SANITIZE_STRING ) !== 'yes' ) {
317-
RFW_Logger::log( 'Cannot find data about Capture button when trying to capture funds for order: ' . $post_id, 'critical' );
318317
return;
319318
}
320319

@@ -373,7 +372,7 @@ private function send_capture_request( $charge_id, $order ) {
373372

374373
$response = wp_remote_post( $url, $args );
375374

376-
RFW_Logger::log( 'Capturing order: ' . $order->get_id() . ' responded with: ' . stripslashes( wp_json_encode( $response ) ), 'critical' );
375+
RFW_Logger::log( 'Capturing order: ' . $order->get_id() . ' responded with: ' . stripslashes( wp_json_encode( $response ) ), 'info' );
377376

378377
if ( is_wp_error( $response ) ) {
379378
RFW_Logger::log( 'Capturing order: ' . $order->get_id() . ' failed with message: ' . $response->get_error_message(), 'critical' );

includes/settings/rfw-settings-fields.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
'type' => 'checkbox',
120120
'label' => __( 'Enable logging', 'resolve' ),
121121
// translators: path to log file.
122-
'description' => sprintf( __( 'Log gateway events, stored in %s. Note: this may log personal information. We recommend using this for debugging purposes only and deleting the logs when finished.', 'resolve' ), '<code>' . WC_Log_Handler_File::get_log_file_path( 'resolve' ) . '</code>' ),
122+
'description' => sprintf( __( 'Log gateway events, stored in %s. Note: this may log personal information. We recommend using this for debugging purposes only and deleting the logs when finished.', 'resolve' ), '<code>' . WC_Log_Handler_File::get_log_file_path( RFW_PLUGIN_ID ) . '</code>' ),
123123
'default' => 'no',
124124
],
125125
];

0 commit comments

Comments
 (0)