Title: Call to undefined function
Last modified: May 18, 2021

---

# Call to undefined function

 *  Resolved [bernardoliveira](https://wordpress.org/support/users/bernardoliveira/)
 * (@bernardoliveira)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/call-to-undefined-function-39/)
 * Hello,
 * Since I started using this plugin I have this critical error in a custom plugin.
 * `Error message: Uncaught Error: Call to undefined function wc_gateway_ppec_get_transaction_fee()`
   `
   $paypal_fee = wc_gateway_ppec_get_transaction_fee( $order );`
 * What would be the equivalent function for that in this PayPal plugin?
 * Thank you very much!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [Syde Niklas](https://wordpress.org/support/users/niklasinpsyde/)
 * (@niklasinpsyde)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/call-to-undefined-function-39/#post-14454212)
 * Hi [@bernardoliveira](https://wordpress.org/support/users/bernardoliveira/),
 * The name `wc_gateway_ppec` refers to the [PayPal Checkout Payment Gateway](https://wordpress.org/plugins/woocommerce-gateway-paypal-express-checkout/).
   PayPal Payments does not have a transaction fee feature implemented yet, but 
   it will likely come at a later point.
    Could you give us more details on what
   you are trying to achieve with your custom plugin? Thanks!
 * Kind regards,
    Niklas
 *  Thread Starter [bernardoliveira](https://wordpress.org/support/users/bernardoliveira/)
 * (@bernardoliveira)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/call-to-undefined-function-39/#post-14461156)
 * Hello [@niklasinpsyde](https://wordpress.org/support/users/niklasinpsyde/),
 * Thank you for your reply. Hmm, I understand.
 * This custom plugin exports all orders to an XML file.
 *     ```
       $paypal_fee = wc_gateway_ppec_get_transaction_fee( $order );
       if( $paypal_fee ) {
       $fee = $paypal_fee;
       }
       ```
   
 * Is there any order day I can make it?
 * Thank you very much.
    -  This reply was modified 4 years, 11 months ago by [bernardoliveira](https://wordpress.org/support/users/bernardoliveira/).
    -  This reply was modified 4 years, 11 months ago by [bernardoliveira](https://wordpress.org/support/users/bernardoliveira/).
 *  Plugin Support [Syde Niklas](https://wordpress.org/support/users/niklasinpsyde/)
 * (@niklasinpsyde)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/call-to-undefined-function-39/#post-14533772)
 * Hi [@bernardoliveira](https://wordpress.org/support/users/bernardoliveira/),
 * There is no fee functionality built into PayPal Payments. So if this code causes
   problems for you when exporting orders paid for with Paypal Payments, then I 
   suggest removing it. To me, it seems only to work for orders paid for with the
   PayPal Checkout gateway anyway.
    If any questions remain, please let us know.
   Thanks!
 * Kind regards,
    Niklas

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Call to undefined function’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-paypal-payments/assets/icon-256x256.png?rev=
   3234615)
 * [WooCommerce PayPal Payments](https://wordpress.org/plugins/woocommerce-paypal-payments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-paypal-payments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-paypal-payments/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-paypal-payments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-paypal-payments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-paypal-payments/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Syde Niklas](https://wordpress.org/support/users/niklasinpsyde/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/call-to-undefined-function-39/#post-14533772)
 * Status: resolved