• Resolved pontuserikssondotcom

    (@pontuserikssondotcom)


    I am reciving this error Code when updating the page. Any solution?

    Fatal error: Uncaught Error: Call to a member function get_downloadable_products() on null in /customers/e/a/a/sheet.direct/httpd.www/wp-content/plugins/woocommerce-my-downloads-shortcode/woocommerce-my-downloads.php:97 Stack trace: #0 /customers/e/a/a/sheet.direct/httpd.www/wp-includes/shortcodes.php(355): Woocommerce_My_Downloads::my_downloads_button_shortcode(Array, '', 'woocommerce-my-...') #1 [internal function]: do_shortcode_tag(Array) #2 /customers/e/a/a/sheet.direct/httpd.www/wp-includes/shortcodes.php(227): preg_replace_callback('/\\[(\\[?)(woocom...', 'do_shortcode_ta...', '
    
    apply_filters('
    
    build_indexable(1103) #8 /customers/e/a/a/sheet.direct/httpd.www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #9 /customers/e/a/a/sheet.direct/httpd.www/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #10 /customers/e/a/a/sheet.direct/httpd.www/wp-includes/post.php(4728): do_action('wp_insert_post', 1103, Object(WP_Post), true) #11 /customers/e/a/a/sheet.direct/httpd.www/wp-includes/post.php(4819): wp_insert_post(Array, false, true) #12 /customers/e/a/a/sheet.direct/httpd.www/wp-admin/includes/post.php(426): wp_update_post(Array) #13 /customers/e/a/a/sheet.direct/httpd.www/wp-admin/post.php(227): edit_post() #14 {main} thrown in /customers/e/a/a/sheet.direct/httpd.www/wp-content/plugins/woocommerce-my-downloads-shortcode/woocommerce-my-downloads.php on line 97 
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Matt Pramschufer

    (@mattpramschufer)

    hey @pontuserikssondotcom thanks for reaching out. What version are you currently running?

    Do me a favor and try to change. That should be on line 96, see how we are checking for null of $woocommerce, change that to be $woocommerce->customer

    if ( ! is_null( $woocommerce) ) { 
       $downloads = $woocommerce->customer->get_downloadable_products();
    } else {
       $downloads = array();
    }

    to be

    if ( ! is_null( $woocommerce->customer ) ) { 
       $downloads = $woocommerce->customer->get_downloadable_products();
    } else {
       $downloads = array();
    }

    Let’s see if that corrects your issue.

    Thread Starter pontuserikssondotcom

    (@pontuserikssondotcom)

    Solution was in the previous support ticket. Please update the plugin.

    Plugin Author Matt Pramschufer

    (@mattpramschufer)

    Excuse me? I am assuming that fix worked for you then?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘woocommerce-my-downloads.php on line 97’ is closed to new replies.