Title: php error &#8211; data was called incorrectly
Last modified: February 3, 2026

---

# php error – data was called incorrectly

 *  Resolved [meezer432](https://wordpress.org/support/users/meezer432/)
 * (@meezer432)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/php-error-data-was-called-incorrectly/)
 * Hi, I am a long-time Braintree user. I continually see this php error. Please
   tell me how to fix it or you have a fix for it. (please don’t tell me to turn
   off php error monitoring) thanks, John
 * data was called incorrectly. Order properties should not be accessed directly.
   Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-
   loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters,
   WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_checkout’), WP_Hook->do_action, WP_Hook-
   >apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout-
   >process_order_payment, WC_Braintree\WC_Gateway_Braintree->process_payment, SkyVerge\
   WooCommerce\PluginFramework\v5_15_10\SV_WC_Payment_Gateway_Direct->do_transaction,
   WC_Braintree\WC_Gateway_Braintree_Credit_Card->do_credit_card_transaction, WC_Braintree\
   API\WC_Braintree_API->credit_card_charge, WC_Braintree\API\Requests\WC_Braintree_API_Transaction_Request-
   >create_credit_card_charge, WC_Braintree\API\Requests\WC_Braintree_API_Transaction_Request-
   >create_transaction, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This
   message was added in version 3.0.

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

 *  Plugin Support [Frank Remmy (woo-hc)](https://wordpress.org/support/users/frankremmy/)
 * (@frankremmy)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/php-error-data-was-called-incorrectly/#post-18809058)
 * Hi [@meezer432](https://wordpress.org/support/users/meezer432/),
 *  I understand how frustrating it can be to repeatedly see this warning, especially
   without wanting to simply silence it.
 * I tested this on my side but was unable to reproduce the error. A few additional
   things to try:
    - First, ensure you are running the latest version of the Braintree and WooCommerce.
    - Sometimes, other plugins or your active theme may also interact with orders
      improperly, causing these messages. Disable other plugins except WooCommerce
      and Braintree to test if the issue persists.
    - Go to WooCommerce → Status → Logs, select the most recent Braintree‑related
      log, and check whether the warning appears during a specific action (e.g.,
      creating the order, updating metadata, sending the transaction request). That
      helps pinpoint which part of the flow is calling legacy properties.
    - Check to see if your theme overrides checkout or order templates and they’re
      out of date, they can still reference deprecated order properties.
    - Even small snippets in `functions.php` or a custom plugin can trigger this
      warning. Disabling all custom code temporarily is a good sanity check.
 * If the issue persists, please share your System Status Report. You can find this
   under WooCommerce → Status, then copy the report and share it via [https://pastebin.com](https://pastebin.com/),
   [https://quickforget.com](https://quickforget.com/), or [https://gist.github.com](https://gist.github.com/).
 * Once we have that, we can dig deeper and help you track down the exact source.
 *  [whuchumeen](https://wordpress.org/support/users/whuchumeen/)
 * (@whuchumeen)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/php-error-data-was-called-incorrectly/#post-18810250)
 * Thank you for your response, Frank.
 * Yes, we always run the latest versions of Braintree and Woocommerce.
 * The WooCommerce → Status → Log files didn’t provide much information. However,
   it appears that one incidence may have taken place during ‘place order’.
 * We didn’t find any plugin or theme conflicts. Nor did we modify functions.php
   in recent months.
 * I’ve pasted the woo system status here: [https://pastebin.com/uDua5J1X](https://pastebin.com/uDua5J1X)
 * Thank you for your help, John
 *  Plugin Support [Frank Remmy (woo-hc)](https://wordpress.org/support/users/frankremmy/)
 * (@frankremmy)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/php-error-data-was-called-incorrectly/#post-18810334)
 * Hi [@meezer432](https://wordpress.org/support/users/meezer432/),
 * Thank you for sharing the detailed system status report and confirming that you
   are running the latest versions of WooCommerce and the Braintree.
 * From the report, your environment looks healthy overall, and I noticed that no
   obvious incompatibilities are present. However, one point worth highlighting 
   is that your server environment is missing the PHP SoapClient extension. While
   this generally impacts only some gateways using SOAP, it’s something to note 
   as it might affect integrations or extensions that rely on it.
 * Given you’ve checked logs and didn’t find clear error context, and disabled customizations
   without success, I recommend the following next steps:
    - I see that Debug mode is actually turned off, which is why you couldn’t find
      anything in the logs. Go to WooCommerce → Settings → Payments → Braintree 
      Gateway settings and enable Debug Mode to capture more detailed logs during
      checkout transactions. Then place a test order and review the logs for more
      specific messages about which code triggers the legacy property calls.
    - Did you get a chance to perform the conflict tests? If so, what were your 
      findings?
    - While the absence of the SoapClient extension might not be the direct cause,
      enabling it could resolve subtle integration issues and improve compatibility
      with payment gateways.
 * If after these steps the issue persists, please share any new debug logs or error
   messages.
 * I hope that helps. Let us know if you need anything else.
 *  [whuchumeen](https://wordpress.org/support/users/whuchumeen/)
 * (@whuchumeen)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/php-error-data-was-called-incorrectly/#post-18811547)
 * Thanks for your response, Frank. We didn’t notice any plugin or theme conflicts.
 * After turning Braintree debug on and doing a test order, this was the output 
   of the logs – please let me know if this helps determine the problem…thanks, 
   John:
 * _[ SNIP!]_
 *  [Sai (woo-hc)](https://wordpress.org/support/users/saivutukuru/)
 * (@saivutukuru)
 * [3 months, 3 weeks ago](https://wordpress.org/support/topic/php-error-data-was-called-incorrectly/#post-18814501)
 * Hi [@meezer432](https://wordpress.org/support/users/meezer432/),
 * Thanks for sharing the debug logs.
 * The notice you’re seeing is a WooCommerce “doing_it_wrong” warning, not a fatal
   error, and it’s not caused by a failed Braintree transaction. Your logs confirm
   that payments are processing successfully and being submitted for settlement.
 * This warning is triggered when legacy order properties are accessed directly (
   for example `$order->id` instead of `$order->get_id()`). While Braintree appears
   in the stack trace, that doesn’t necessarily mean it’s the source — any plugin
   or theme hooked into checkout can trigger this if it uses deprecated order access.
 * The Braintree debug logs you shared only show normal API requests and successful
   responses.
 * To identify the exact source, please temporarily enable WP_DEBUG and WP_DEBUG_LOG
   in `wp-config.php`, place a test order, and check `wp-content/debug.log` for 
   a file path near `WC_Abstract_Legacy_Order->__get`. That will point to the plugin
   or theme responsible.
 * At this point, the issue is informational only and does not impact checkout or
   payment processing.
 * Let us know what you find and we’re happy to take another look.
 *  [whuchumeen](https://wordpress.org/support/users/whuchumeen/)
 * (@whuchumeen)
 * [3 months, 2 weeks ago](https://wordpress.org/support/topic/php-error-data-was-called-incorrectly/#post-18816951)
 * Hello Sai, thank you for your response. I understand what you’re saying. You 
   asked me to enable wp_debug and place a test order. My previous post on this 
   thread is from the debug log where I placed a test order.
 * You mention looking for a path near ‘`WC_Abstract_Legacy_Order->__get`‘ in the
   log. My initial post for this thread above shows this path right before that 
   code: ‘WC_Braintree\API\Requests\WC_Braintree_API_Transaction_Request->create_transaction’
 * Given that, I’m unclear on how this error would not be triggered by the Braintree
   code. Can you help me understand that please.
 * Thanks, John
 *  Plugin Support [shahzeen(woo-hc)](https://wordpress.org/support/users/shahzeenfarooq/)
 * (@shahzeenfarooq)
 * [3 months, 2 weeks ago](https://wordpress.org/support/topic/php-error-data-was-called-incorrectly/#post-18823441)
 * Hi [@whuchumeen](https://wordpress.org/support/users/whuchumeen/)
 * Thanks for the clarification and for pointing out the exact log entry that helps
   a lot.
 * I understand why the presence of
   `WC_Braintree\API\Requests\WC_Braintree_API_Transaction_Request-
   >create_transaction`in the stack trace makes it seem like the error is being 
   triggered by the Braintree code.
 * To help us better understand what’s happening and determine the actual impact,
   could you please share a bit more detail about how this surfaces on your end?
    - What are the **exact steps** you take to reproduce the issue from start to
      finish?
    - Where do you **see the error** — is it only in the debug log, or does it appear
      on the frontend or in wp-admin as well?
    - What is the **impact on the store**?
       * Are customers unable to complete checkout, or
       * Is the order processed successfully and this is only a log/notice with 
         no visible effect?
 * This information will help us determine whether the error is purely informational(
   logged during execution but not breaking anything) or if it’s affecting checkout
   functionality, and it will also allow us to try to reproduce the behavior more
   accurately on our end.
 * Once we have those details, we’ll be in a much better position to explain why
   the error is occurring and whether it’s something WooCommerce core, the Braintree
   extension, or an interaction between the two needs to address.
 * Thanks again for your patience and cooperation.
 *  Plugin Author [Malith](https://wordpress.org/support/users/malithsen/)
 * (@malithsen)
 * [3 months, 2 weeks ago](https://wordpress.org/support/topic/php-error-data-was-called-incorrectly/#post-18823604)
 * Thank you for reporting this. We will include a fix for this in the next release.
 *  [whuchumeen](https://wordpress.org/support/users/whuchumeen/)
 * (@whuchumeen)
 * [3 months, 2 weeks ago](https://wordpress.org/support/topic/php-error-data-was-called-incorrectly/#post-18823662)
 * Thank you
 *  Moderator [Support Moderator](https://wordpress.org/support/users/moderator/)
 * (@moderator)
 * [3 months, 2 weeks ago](https://wordpress.org/support/topic/php-error-data-was-called-incorrectly/#post-18823740)
 * [@sfdjsturrrock](https://wordpress.org/support/users/sfdjsturrrock/)
 * Please do not take over someone else’s topic. If you need support then per the
   forum guidelines please start your own topic.
 * [https://wordpress.org/support/forum-user-guide/faq/#i-have-the-same-problem-can-i-just-reply-to-someone-elses-post-with-me-too](https://wordpress.org/support/forum-user-guide/faq/#i-have-the-same-problem-can-i-just-reply-to-someone-elses-post-with-me-too)
 * If you need support you can start your own topic here.
 * [https://wordpress.org/support/plugin/woocommerce-gateway-paypal-powered-by-braintree/](https://wordpress.org/support/plugin/woocommerce-gateway-paypal-powered-by-braintree/)
 *  Plugin Support [Ejay F – a11n](https://wordpress.org/support/users/ejayfernandes/)
 * (@ejayfernandes)
 * [2 months, 3 weeks ago](https://wordpress.org/support/topic/php-error-data-was-called-incorrectly/page/2/#post-18841912)
 * Hi [@meezer432](https://wordpress.org/support/users/meezer432/),
 * Since there hasn’t been any new activity on this thread, I’ll go ahead and mark
   it as resolved for now. Feel free to reach out anytime if you’d like to continue
   the conversation.
 * We’d really appreciate it if you could take a moment to leave us a review: [https://wordpress.org/support/plugin/woocommerce-gateway-paypal-powered-by-braintree/reviews/#new-post ](https://wordpress.org/support/plugin/woocommerce-gateway-paypal-powered-by-braintree/reviews/#new-post)

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-error-data-was-called-incorrectly%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/woocommerce-gateway-paypal-powered-by-braintree/assets/icon-
   256x256.png?rev=3234800)
 * [Braintree for WooCommerce Payment Gateway](https://wordpress.org/plugins/woocommerce-gateway-paypal-powered-by-braintree/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-gateway-paypal-powered-by-braintree/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-gateway-paypal-powered-by-braintree/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-gateway-paypal-powered-by-braintree/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-gateway-paypal-powered-by-braintree/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-gateway-paypal-powered-by-braintree/reviews/)

 * 16 replies
 * 10 participants
 * Last reply from: [Ejay F – a11n](https://wordpress.org/support/users/ejayfernandes/)
 * Last activity: [2 months, 3 weeks ago](https://wordpress.org/support/topic/php-error-data-was-called-incorrectly/page/2/#post-18841912)
 * Status: resolved