Title: Depreciated Code Error
Last modified: April 24, 2024

---

# Depreciated Code Error

 *  Resolved [mfghost](https://wordpress.org/support/users/mfghost/)
 * (@mfghost)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/depreciated-code-error/)
 * When I add something to the cart I get an error at the top of the page that says
 *     ```wp-block-code
       Deprecated: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in /wp-content/plugins/flexible-shipping-usps/vendor_prefixed/vinceg/usps-php-api/src/USPSBase.php on line 149
       ```
   
 * Is there a fix for this so it doesn’t show up in the header of my website?
    -  This topic was modified 2 years, 1 month ago by [mfghost](https://wordpress.org/support/users/mfghost/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdepreciated-code-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [mfghost](https://wordpress.org/support/users/mfghost/)
 * (@mfghost)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/depreciated-code-error/#post-17709099)
 * I fixed it by changing the end of line 149 :
 * `$query_string = http_build_query($params, null, '&');`
 * to
 *     ```wp-block-code
       $query_string = http_build_query($params, '', '&');
       ```
   
    -  This reply was modified 2 years, 1 month ago by [mfghost](https://wordpress.org/support/users/mfghost/).
 *  Plugin Support [tograczyk](https://wordpress.org/support/users/tograczyk/)
 * (@tograczyk)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/depreciated-code-error/#post-17710770)
 * Hi [@mfghost](https://wordpress.org/support/users/mfghost/),
 * The deprecated message is indeed related to something we need to update in the
   plugin, thanks for letting us know, we will address this in the future updates.
 * > Is there a fix for this so it doesn’t show up in the header of my website?
 * We recommend disabling debug mode if the website is live. You can do this by 
   adding the necessary code in the wp-config.php file:
   `define( 'WP_DEBUG', false);`
 * or hide the message using:
 * `define( 'WP_DEBUG'_DISPLAY, false );`
 * This is described in more detail in the _Debugging in WordPress_ article:
 * > Enabling `WP_DEBUG` will cause all PHP errors, notices, and warnings to be 
   > displayed. (…) Showing all PHP notices and warnings often results in error 
   > messages for things that don’t seem broken, but do not follow proper data validation
   > conventions inside PHP.
   >  [https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/#wp_debug](https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/#wp_debug)
 * Please let us know if you have any additional questions.
 * Best regards,
   Tomek

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

The topic ‘Depreciated Code Error’ is closed to new replies.

 * ![](https://ps.w.org/flexible-shipping-usps/assets/icon.svg?rev=2737986)
 * [Shipping Live Rates for USPS for WooCommerce](https://wordpress.org/plugins/flexible-shipping-usps/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/flexible-shipping-usps/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/flexible-shipping-usps/)
 * [Active Topics](https://wordpress.org/support/plugin/flexible-shipping-usps/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/flexible-shipping-usps/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/flexible-shipping-usps/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [tograczyk](https://wordpress.org/support/users/tograczyk/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/depreciated-code-error/#post-17710770)
 * Status: resolved