Add filter for disabling fees on wc order admin pages

This commit is contained in:
Alex P 2023-02-01 16:31:43 +02:00
parent fddd6c35e9
commit c3329c5e9d
No known key found for this signature in database
GPG key ID: 54487A734A204D71

View file

@ -148,6 +148,12 @@ class WCGatewayModule implements ModuleInterface {
if ( ! $wc_order instanceof WC_Order ) {
return;
}
/**
* The filter can be used to remove the rows with PayPal fees in WC orders.
*/
if ( ! apply_filters( 'woocommerce_paypal_payments_show_fees_on_order_admin_page', true, $wc_order ) ) {
return;
}
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $fees_renderer->render( $wc_order );