• Resolved zaetheo

    (@zaetheo)


    Good day – I trust you are all doing very well and staying safe during this protracted pandemic.

    I am building a WooCommerce (WC) website and having issues with products being imported from a 3rd-party drop shipper.

    It appears that the WC function called get_download_files_and_permissions() is expecting argument #1 to be of type WC_Product but it is seeing a variable of type Boolean. This causes the error shown below:

    
    2021-12-27T04:23:57+00:00 CRITICAL Uncaught TypeError: Automattic\WooCommerce\Internal\DownloadPermissionsAdjuster::get_download_files_and_permissions(): Argument #1 ($product) must be of type WC_Product, bool given, called in /home/XXXXX/public_html/shopomee/wp-content/plugins/woocommerce/src/Internal/DownloadPermissionsAdjuster.php on line 103 and defined in /home/XXXXX/public_html/shopomee/wp-content/plugins/woocommerce/src/Internal/DownloadPermissionsAdjuster.php:138
    Stack trace:
    #0 /home/XXXXX/public_html/shopomee/wp-content/plugins/woocommerce/src/Internal/DownloadPermissionsAdjuster.php(103): Automattic\WooCommerce\Internal\DownloadPermissionsAdjuster->get_download_files_and_permissions(false)
    #1 /home/XXXXX/public_html/shopomee/wp-includes/class-wp-hook.php(303): Automattic\WooCommerce\Internal\DownloadPermissionsAdjuster->adjust_download_permissions(1090458)
    #2 /home/XXXXX/public_html/shopomee/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array)
    #3 /home/XXXXX/public_html/shopomee/wp-includes/plugin.php(518): WP_Hook->do_action(Array)
    #4 /home/XXXXX/public_html/shopomee/wp-content/plugins/woocommerce/packages/action-scheduler/classes/actions/ActionScheduler_Action.php(22): do_action_ref_array('adjust_download...', Array)
    #5 /home/XXXXX/public_html/shopomee/wp-content/plugins/woocommerce/packages/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php(65): ActionScheduler_Action->execute()
    #6 /home/XXXXX/public_html/shopomee/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(162): ActionScheduler_Abstract_QueueRunner->process_action(41909, 'Async Request')
    #7 /home/XXXXX/public_html/shopomee/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(132): ActionScheduler_QueueRunner->do_batch(25, 'Async Request')
    #8 /home/XXXXX/public_html/shopomee/wp-includes/class-wp-hook.php(303): ActionScheduler_QueueRunner->run('Async Request')
    #9 /home/XXXXX/public_html/shopomee/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array)
    #10 /home/XXXXX/public_html/shopomee/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
    #11 /home/XXXXX/public_html/shopomee/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_AsyncRequest_QueueRunner.php(52): do_action('action_schedule...', 'Async Request')
    #12 /home/XXXXX/public_html/shopomee/wp-content/plugins/woocommerce/includes/libraries/wp-async-request.php(147): ActionScheduler_AsyncRequest_QueueRunner->handle()
    #13 /home/XXXXX/public_html/shopomee/wp-includes/class-wp-hook.php(303): WP_Async_Request->maybe_handle('')
    #14 /home/XXXXX/public_html/shopomee/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array)
    #15 /home/XXXXX/public_html/shopomee/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
    #16 /home/XXXXX/public_html/shopomee/wp-admin/admin-ajax.php(202): do_action('wp_ajax_nopriv_...')
    #17 {main}
      thrown in /home/XXXXX/public_html/shopomee/wp-content/plugins/woocommerce/src/Internal/DownloadPermissionsAdjuster.php on line 138
    

    The error persists even when EVERY plugin has been disabled (except for WC) and I use the storefront theme. WP and all plugins are up to date.

    The products being imported are from a 3rd-party dropshipper located at https://www.wholesale2b.com/.

    Here’s the WP environment:

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://shopomee.com
    Site address (URL): https://shopomee.com
    WC Version: 6.0.0
    REST API Version: ? 6.0.0
    WC Blocks Version: ? 6.3.3
    Action Scheduler Version: ? 3.3.0
    WC Admin Version: ? 2.9.4
    Log Directory Writable: ?
    WP Version: 5.8.2
    WP Multisite: –
    WP Memory Limit: 2 GB
    WP Debug Mode: –
    WP Cron: ?
    Language: en_US
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 8.0.14
    PHP Post Max Size: 128 MB
    PHP Time Limit: 900
    PHP Max Input Vars: 5000
    cURL Version: 7.61.1
    OpenSSL/1.1.1k
    
    SUHOSIN Installed: –
    MySQL Version: 8.0.27
    Max Upload Size: 16 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 6.0.0
    WC Database Prefix: shop_
    Total Database Size: 210.86MB
    Database Data Size: 114.75MB
    Database Index Size: 96.11MB
    shop_woocommerce_sessions: Data: 25.06MB + Index: 8.02MB + Engine InnoDB
    shop_woocommerce_api_keys: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
    shop_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    shop_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    shop_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    shop_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    shop_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    shop_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    shop_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    shop_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    shop_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    shop_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    shop_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    shop_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    shop_actionscheduler_actions: Data: 11.41MB + Index: 16.91MB + Engine InnoDB
    shop_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    shop_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    shop_actionscheduler_logs: Data: 10.42MB + Index: 8.97MB + Engine InnoDB
    shop_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    shop_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    shop_commercekit_searches: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    shop_commercekit_waitlist: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    shop_commercekit_wishlist: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    shop_commercekit_wishlist_items: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    shop_e_submissions: Data: 0.02MB + Index: 0.23MB + Engine InnoDB
    shop_e_submissions_actions_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    shop_e_submissions_values: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    shop_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    shop_mclean_refs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    shop_mclean_scan: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    shop_nextend2_image_storage: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    shop_nextend2_section_storage: Data: 0.06MB + Index: 0.06MB + Engine InnoDB
    shop_nextend2_smartslider3_generators: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    shop_nextend2_smartslider3_sliders: Data: 0.06MB + Index: 0.03MB + Engine InnoDB
    shop_nextend2_smartslider3_sliders_xref: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    shop_nextend2_smartslider3_slides: Data: 0.17MB + Index: 0.11MB + Engine InnoDB
    shop_options: Data: 9.02MB + Index: 1.25MB + Engine InnoDB
    shop_postmeta: Data: 33.31MB + Index: 19.41MB + Engine InnoDB
    shop_posts: Data: 8.13MB + Index: 5.66MB + Engine InnoDB
    shop_term_relationships: Data: 0.47MB + Index: 0.25MB + Engine InnoDB
    shop_term_taxonomy: Data: 0.16MB + Index: 0.19MB + Engine InnoDB
    shop_termmeta: Data: 0.11MB + Index: 0.14MB + Engine InnoDB
    shop_terms: Data: 0.16MB + Index: 0.20MB + Engine InnoDB
    shop_usermeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
    shop_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    shop_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    shop_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
    shop_wc_category_lookup: Data: 0.09MB + Index: 0.00MB + Engine InnoDB
    shop_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    shop_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    shop_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    shop_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    shop_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    shop_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    shop_wc_product_meta_lookup: Data: 3.47MB + Index: 5.75MB + Engine InnoDB
    shop_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    shop_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    shop_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    shop_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    shop_wpf_filters: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    shop_wpf_meta_data: Data: 11.50MB + Index: 27.84MB + Engine InnoDB
    shop_wpf_meta_keys: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    shop_wpf_meta_values: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    shop_wpf_meta_values_bk: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    shop_wpf_modules: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    shop_wpf_modules_type: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    shop_wpf_usage_stat: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    shop_wpforms_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    shop_wpmm_subscribers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    
    ### Post Type Counts ###
    
    attachment: 4754
    custom_css: 2
    customize_changeset: 36
    elementor_library: 12
    mc4wp-form: 1
    nav_menu_item: 121
    page: 31
    post: 2
    product: 1485
    product_variation: 9502
    revision: 23
    shop_order: 1
    wp_block: 1
    wpcf7_contact_form: 1
    wpforms: 1
    
    ### Security ###
    
    Secure connection (HTTPS): ?
    Hide errors from visitors: ?
    
    ### Active Plugins (25) ###
    
    Advanced Database Cleaner PRO: by Younes JFR. – 3.1.6
    CommerceGurus Commercekit: by CommerceGurus – 1.3.0
    Contact Form 7 Image Captcha: by KC Computing – 3.2.4
    Contact Form 7: by Takayuki Miyoshi – 5.5.3
    Elementor Pro: by Elementor.com – 3.5.2
    Elementor: by Elementor.com – 3.5.2
    Email Templates: by wpexpertsio – 1.3.2.1
    Email Verification for WooCommerce: by WPFactory – 2.2.5
    Flexible Shipping: by WP Desk – 4.11.0
    HT Easy GA4: by HasThemes – 1.0.2
    Kirki Customizer Framework: by David Vongries – 3.1.9
    MC4WP: Mailchimp for WordPress: by ibericode – 4.8.6
    Media Cleaner: by Jordy Meow – 6.2.7
    Smart Slider 3: by Nextend – 3.5.1.2
    WebP Converter for Media: by Mateusz Gbiorczyk – 4.0.3
    Product Filter by WooBeWoo: by WooBeWoo – 2.0.4
    Return Refund and Exchange for WooCommerce: by MakeWebBetter – 3.1.3
    WooCommerce Payments: by Automattic – 3.4.0
    WooCommerce: by Automattic – 6.0.0
    Woo Product Filter PRO: by WooBeWoo – 2.0.4
    WP Crontrol: by John Blackbourn & crontributors – 1.12.0
    WP Fastest Cache Premium: by Emre Vona – 1.6.2
    WP Fastest Cache: by Emre Vona – 0.9.7
    WP Maintenance Mode: by Designmodo – 2.4.1
    WPForms Lite: by WPForms – 1.7.1.2
    
    ### Inactive Plugins (0) ###
    
    ### Settings ###
    
    API Enabled: –
    Force SSL: –
    Currency: CAD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: –
    
    ### WC Pages ###
    
    Shop base: #9 - /shop/
    Cart: #10 - /cart/
    Checkout: #11 - /checkout/
    My account: #12 - /my-account/
    Terms and conditions: #795 - /terms-and-conditions/
    
    ### Theme ###
    
    Name: Shoptimizer Child Theme
    Version: 1.2.1
    Author URL: 
    Child Theme: ?
    Parent Theme Name: Shoptimizer
    Parent Theme Version: 2.4.5
    Parent Theme Author URL: https://www.commercegurus.com/
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: –
    
    ### WooCommerce Payments ###
    
    Version: 3.4.0
    Connected to WPCOM: Yes
    Blog ID: 195519755
    Account ID: acct_1JLXwE2EloatiHBP
    
    ### Action Scheduler ###
    
    Complete: 43,097
    Oldest: 2021-11-26 21:48:33 -0700
    Newest: 2021-12-27 09:52:15 -0700
    
    Failed: 439
    Oldest: 2021-11-22 23:03:48 -0700
    Newest: 2021-12-27 08:18:17 -0700
    
    Pending: 5
    Oldest: 2021-12-27 11:19:08 -0700
    Newest: 2022-01-02 23:13:54 -0700
    
    ### Status report information ###
    
    Generated at: 2021-12-27 11:03:45 -07:00
    

    I’ve seen other similar errors on this forum but the solutions proposed there (e.g. deleting all products and starting from scratch) don’t seem to work in my case.

    Any ideas? The support people over at the dropshipper suggested it’s a WC issue (of course!).

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey @zaetheo,

    I hope you’re staying well in the midst of this pandemic too. Are you using the built-in CSV import tool or some other method to import the products?

    If it’s the built-in CSV import, here’s what I would recommend. Create a sample product inside the WooCommerce dashboard and export it. Then make a change and import it again to update the product. See if you run into the same error. If you don’t, there may be something wrong with the formatting of the import file you’re using.

    Let us know how that goes and we’ll take it from there.

    Thanks!

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    It’s been a while since we last heard back from you. I’m going to mark this thread as resolved.

    Hopefully, the above information was helpful – we’ll be here if and/or when you are ready to continue.

    Thread Starter zaetheo

    (@zaetheo)

    Pardon the delay, folks. Been dealing with some COVID stuff over the past weeks.

    We decided to move away from that 3rd-party drop-shipping service so this is no longer an issue. Thank you very much.

    Cheers and stay safe out there,
    Alex

    @zaetheo

    Glad to hear it – thanks for letting us know!

    If you have any further questions, I recommend creating a new thread.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘adjust_download_permissions issue’ is closed to new replies.