• Resolved nknov12

    (@nknov12)


    Hello there,

    First of all, a great plugin.

    We are seeing an error message after a file has been uploaded in the Order Details Page. When a PDF file is uploaded it works fine and the ‘Dimensions’ column shows ‘-‘.

    However after the screen is refreshed or if the Order is opened again, instead of ‘Dimensions’ showing ‘-‘, it shows as error – ‘Notice: Trying to access array offset on value of type bool in /var/www/html/wp-content/plugins/woocommerce-checkout-manager/templates/order/order-upload-files.php on line 27 -‘

    Same thing also on the admin site. The error is – ‘Notice: Trying to access array offset on value of type bool in /var/www/html/wp-content/plugins/woocommerce-checkout-manager/includes/view/backend/meta-boxes/html-order-uploads.php on line 30 -‘

    It is probably a very minor thing, please see if it can be corrected.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @nknov12

    Is it possible to share a valid URL were issue can be replicated. ?

    In addition, please confirm you have the latest version of the plugin and that your overall website is up to date (plugins, theme, WP core)

    Also, debug as following if you haven’t done yet:

    • Deactivate plugins one by one checking each time.
    • Switch to Storefront theme and test
    • Disable any custom scripts you might have.

    You might need to clean cache each time

    Thread Starter nknov12

    (@nknov12)

    Hi @sebastopolys, this error message can be replicated on any setup with the debug mode when a non-image file is uploaded.

    Hope this helps:
    wp_get_attachment_image_src is used to fetch $image_attributes2
    wp_get_attachment_image_src returns ‘bool’ false if its not an image instead of returning an array. Refer to wp_get_attachment_image_src on WordPress codex https://developer.www.ads-software.com/reference/functions/wp_get_attachment_image_src/
    So $image_attributes2[1] == ” throws ‘Trying to access array offset on value of type bool’ on non-image files.

    Thread Starter nknov12

    (@nknov12)

    Finally figured it out. While setting up the Field, one needs to set up the Show/Hide for Product / Categories. However, it is not displayed as a required field.

    So if this is set up without selecting any, it throws up these errors.

    You may look at making it a required check or have default for all Product / Categories. This can be deemed resolved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘After Upload Error’ is closed to new replies.