Support » Plugin: Product Feed PRO for WooCommerce » Plugin creates a critical error

  • Resolved pfleming33

    (@pfleming33)


    I have product feed pro running successfully on another site

    But on dev.ozpilot.com.au I am getting the error below when I hit the generate feed button at the end of the create feed process. This site is a copy of the one that works.

    Already existing feeds will not update and do not exist when attempting to download.

    I have followed instructions for WP_CRON and deactivating and have re-installed the plugin. Strangely the old feeds were still there.

    Any help would be appreciated…

    Error Details
    =============
    An error of type E_ERROR was caused in line 1083 of the file /home/customer/www/dev.ozpilot.com.au/public_html/wp-content/plugins/woocommerce/includes/wc-product-functions.php. Error message: Uncaught Error: Unsupported operand types in /home/customer/www/dev.ozpilot.com.au/public_html/wp-content/plugins/woocommerce/includes/wc-product-functions.php:1083
    Stack trace:
    #0 /home/customer/www/dev.ozpilot.com.au/public_html/wp-content/plugins/woo-product-feed-pro/classes/class-get-products.php(2876): wc_get_price_excluding_tax(Object(WC_Product_Simple))
    #1 /home/customer/www/dev.ozpilot.com.au/public_html/wp-content/plugins/woo-product-feed-pro/woocommerce-sea.php(4556): WooSEA_Get_Products->woosea_get_products(Array)
    #2 /home/customer/www/dev.ozpilot.com.au/public_html/wp-content/plugins/woo-product-feed-pro/woocommerce-sea.php(4363): woosea_continue_batch(‘BAWkfdttRqAfwN0…’)
    #3 /home/customer/www/dev.ozpilot.com.au/public_html/wp-includes/class-wp-hook.php(307): woosea_generate_pages(”)
    #4 /home/customer/www/dev.ozpilot.com.au/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(”, Array)
    #5 /home/customer/www/dev.ozpilot.com.au/public_html/wp-includes/plugin.php(474): WP_Hook->

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter pfleming33

    (@pfleming33)

    Here is a copy of the log…

    03-23-2022 @ 14:17:43 - <!-- Start new QUERY -->
    03-23-2022 @ 14:17:43 - Array
    (
        [posts_per_page] => 566
        [offset] => 0
        [post_type] => Array
            (
                [0] => product
                [1] => product_variation
            )
    
        [post_status] => publish
        [fields] => ids
        [no_found_rows] => 1
    )
    
    03-23-2022 @ 14:17:43 - <!-- START new QUERY -->
    03-23-2022 @ 14:29:47 - <!-- Start new QUERY -->
    03-23-2022 @ 14:29:47 - Array
    (
        [posts_per_page] => 566
        [offset] => 0
        [post_type] => Array
            (
                [0] => product
                [1] => product_variation
            )
    
        [post_status] => publish
        [fields] => ids
        [no_found_rows] => 1
    )
    
    03-23-2022 @ 14:29:47 - <!-- START new QUERY -->
    03-23-2022 @ 14:30:07 - <!-- Start new QUERY -->
    03-23-2022 @ 14:30:07 - Array
    (
        [posts_per_page] => 566
        [offset] => 0
        [post_type] => Array
            (
                [0] => product
                [1] => product_variation
            )
    
        [post_status] => publish
        [fields] => ids
        [no_found_rows] => 1
    )
    
    03-23-2022 @ 14:30:07 - <!-- START new QUERY -->
    03-23-2022 @ 14:35:40 - <!-- Start processing new product -->
    03-23-2022 @ 14:35:40 - In update_project function
    03-23-2022 @ 14:35:40 - <!-- End processing product -->
    03-23-2022 @ 14:35:40 - <!-- Start processing new product -->
    03-23-2022 @ 14:35:40 - BAWkfdttRqAfwN0wR3ayfKXk5WHva7kI
    03-23-2022 @ 14:35:40 - <!-- End processing product -->
    03-23-2022 @ 14:35:47 - <!-- Start processing new product -->
    03-23-2022 @ 14:35:47 - In update_project function
    03-23-2022 @ 14:35:47 - <!-- End processing product -->
    03-23-2022 @ 14:36:05 - <!-- Start processing new product -->
    03-23-2022 @ 14:36:05 - In update_project function
    03-23-2022 @ 14:36:05 - <!-- End processing product -->
    03-23-2022 @ 14:36:11 - <!-- Start processing new product -->
    03-23-2022 @ 14:36:11 - In update_project function
    03-23-2022 @ 14:36:11 - <!-- End processing product -->
    03-23-2022 @ 14:36:18 - <!-- Start processing new product -->
    03-23-2022 @ 14:36:18 - In update_project function
    03-23-2022 @ 14:36:18 - <!-- End processing product -->
    03-23-2022 @ 14:36:18 - <!-- Start new QUERY -->
    03-23-2022 @ 14:36:18 - Array
    (
        [posts_per_page] => 566
        [offset] => 0
        [post_type] => Array
            (
                [0] => product
                [1] => product_variation
            )
    
        [post_status] => publish
        [fields] => ids
        [no_found_rows] => 1
    )
    
    03-23-2022 @ 14:36:18 - <!-- START new QUERY -->
    Plugin Contributor supportadtribes

    (@supportadtribes)

    Hi,

    Thanks for using our plugin and reaching out to us.

    We are not entirely sure that the error is caused by our plugin as it starts with this:

    An error of type E_ERROR was caused in line 1083 of the file /home/customer/www/dev.ozpilot.com.au/public_html/wp-content/plugins/woocommerce/includes/wc-product-functions.php. Error message: Uncaught Error: Unsupported operand types in /home/customer/www/dev.ozpilot.com.au/public_html/wp-content/plugins/woocommerce/includes/wc-product-functions.php:1083

    Only after the above error happening an error line shows that has to do with our plugin:
    #0 /home/customer/www/dev.ozpilot.com.au/public_html/wp-content/plugins/woo-product-feed-pro/classes/class-get-products.php(2876): wc_get_price_excluding_tax(Object(WC_Product_Simple))

    The function “wc_get_price_excluding_tax” is just a native WooCommerce function so that should work fine. Are you on the latest versions of WordPress and WooCommerce?

    Thread Starter pfleming33

    (@pfleming33)

    Hi

    Everything is up to date.

    I tried turning off all other plugins apart from this and woocommerce but still get the error.

    WP_CRON is working as auto updates have been done, so not sure what to do next?

    Thanks

    Peter

    Thread Starter pfleming33

    (@pfleming33)

    I wonder if there is an file access issue.

    The site was password protected up until 2 days ago, I will check with the hosting company whether they can see an issue.

    Thread Starter pfleming33

    (@pfleming33)

    I have had no joy getting this to work. Tried it on a staging site without success, same error.

    Any further thoughts would be appreciated.

    Thanks

    Peter

    Plugin Contributor supportadtribes

    (@supportadtribes)

    Hi Peter,

    We reached out to the support team of WooCommerce for this for you, see:
    https://wordpress.org/support/topic/wc_get_price_excluding_tax-e_error-was-caused/

    We’ll let you know when they replied and came up with a solution.

    Plugin Contributor supportadtribes

    (@supportadtribes)

    See WooCommerce support reply here:
    https://wordpress.org/support/topic/wc_get_price_excluding_tax-e_error-was-caused/#post-15508168

    Can you provide them with the data they are requesting?

    Thread Starter pfleming33

    (@pfleming33)

    I have supplied the data this morning, thanks

    Thread Starter pfleming33

    (@pfleming33)

    I received the reply below after being directed to another support group.

    Is there any point in trying the Elite Version?

    —————————————————

    Damien Smith (Automattic) 
    Apr 6, 2022, 15:17 UTC 
    Hi Peter!
    The Australian site will not run Product Feed Pro, givng a critical error when creating the feed.
    Because of differences in databases -- not only i.e. versioning, but things as fundamental as naming conventions used in settings -- site migration can sometimes be devilishly tricky in unexpected ways.
    Alas, we can only help with plugins we make and/or sell at WooCommerce.com, so I don't think we'll be able to shed much light on this problem with Product Feed Pro.
    What I will say is, since WooCommerce is open source, you can at least find and examine the lines that the error message refers to.
    For example, /woocommerce/includes/wc-product-functions.php:1083 seems to be concerned with setting a variable called $line_price: $line_price = $price * $qty;
    Although I'm not really a coder, the phrase "unsupported operand type" often means an issue caused by mixing strings and integers. That is, the code is attempting a mathematical operation on a non-numeric string.
    I have installed a clean version of woocommerce on the Australian server and Product feed Pro works on it.
    This sounds hopeful. If you then gradually reintroduce the other plugins, theme etc, does it continue to work? That would be my advice if the developers of the Product Feed Pro plugin aren't able to assist.
    I hope that's of some use; I regret that this is outside the scope of our support!
    Best,
    Damien -- Woo Support
    Please note: this ticket will mark itself "closed" if there is no response within 4 days, but you can reopen it at any time by replying.
    Plugin Contributor supportadtribes

    (@supportadtribes)

    Hi,

    The pro and elite version share the same code-base for the above code so that would not make any difference.

    The WooCommerce support reply hints there might actually be an issue going on with some code in their plugin (the multiplying part):

    /woocommerce/includes/wc-product-functions.php:1083 seems to be concerned with setting a variable called $line_price: $line_price = $price * $qty;

    Do I am not entirely sure why they are saying they can’t help with this issue as they say the code is attempting a mathematical operation on a non-numeric string which is causing the issue?

    Plugin Contributor supportadtribes

    (@supportadtribes)

    Assuming the issue at hand has been resolved and our support is no longer required I am going to close this topic for now for housekeeping-reasons. Do not hesitate to reach out to us again when you need our help.

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.