Skip to content

Commit

Permalink
Hide transaction fee on admin order view screen when transaction is n…
Browse files Browse the repository at this point in the history
…ot captured
  • Loading branch information
zmaglica committed Dec 18, 2024
1 parent 5eaa046 commit 8d6185f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/admin/class-wc-payments-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

use Automattic\Jetpack\Identity_Crisis as Jetpack_Identity_Crisis;
use WCPay\Constants\Intent_Status;
use WCPay\Core\Server\Request;
use WCPay\Database_Cache;
use WCPay\Logger;
Expand Down Expand Up @@ -1253,7 +1254,7 @@ public function show_woopay_payment_method_name_admin( $order_id ) {
*/
public function display_wcpay_transaction_fee( $order_id ) {
$order = wc_get_order( $order_id );
if ( ! $order || ! $order->get_meta( '_wcpay_transaction_fee' ) ) {
if ( ! $order || ! $order->get_meta( '_wcpay_transaction_fee' ) || Intent_Status::REQUIRES_CAPTURE === $order->get_meta( WC_Payments_Order_Service::INTENTION_STATUS_META_KEY ) ) {
return;
}
?>
Expand Down

0 comments on commit 8d6185f

Please sign in to comment.