Merge pull request #1153 from woocommerce/PCP-1418-fees-display-filter

Add filter for disabling fees on wc order admin pages
This commit is contained in:
Emili Castells 2023-02-10 12:34:58 +01:00 committed by GitHub
commit dd80f8fcfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 );