mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add filter for disabling fees on wc order admin pages
This commit is contained in:
parent
fddd6c35e9
commit
c3329c5e9d
1 changed files with 6 additions and 0 deletions
|
@ -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 );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue