Support » Plugin: WooCommerce USPS Shipping Method Plugin » "Warning: Declaration of WF_Shipping_USPS…" Error

  • Resolved lumberjackhats

    (@lumberjackhats)



    Updated WooCommerce to the newest version and now I’m receiving this error on the cart page and on the checkout pages:

    Warning: Declaration of WF_Shipping_USPS::calculate_shipping($package) should be compatible with WC_Shipping_Method::calculate_shipping($package = Array) in /srv/users/serverpilot/apps/lumberjackhats/public/wp-content/plugins/woo-usps-shipping-method/includes/class-wf-shipping-usps.php on line 0

    How do I fix this?

    https://wordpress.org/plugins/woo-usps-shipping-method/

Viewing 4 replies - 1 through 4 (of 4 total)
  • I was able to temporarily fix the issue on the UPS plugin by finding where the calculate_shipping function was declared and updating the function signature to match the documentation [0]: public function calculate_shipping( $package = array() ). For the UPS plugin it was located at [1] on line 879.

    [0] https://docs.woothemes.com/wc-apidocs/source-class-WC_Shipping_Method.html#138-141
    [1] plugins/woocommerce-shipping-ups/includes/class-wc-shipping-ups.php

    Please update the plugin. The latest version has fixed this issue.

    Mickey

    (@mickeywf)

    Hi craftymade,

    It seems there is a bit confusion.
    This thread is under USPS plugin and the current version of USPS plugin is 1.1.4.

    From your post, we have realized that you have installed UPS plugin.
    Our current version of UPS plugin is 1.1.7, which is just released.

    I would request you to upgrade UPS plugin to version 1.1.7 to get the issue resolved.

    Hi Debbrancheaau,
    Please provide us the version of the WooCommerce you are using and also the plugin you are using.

    • This reply was modified 1 year, 6 months ago by  Elvin.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘"Warning: Declaration of WF_Shipping_USPS…" Error’ is closed to new replies.