• Hi! Your plugin saves me

    However I have a bug… If I activate the plugin, the editor where there are any shortcode of this plugin, give a fatal error. When I have to edit the page, I deactivate the plugin, I do the change, and then I get back to activate it. But this for my client is tricky so, please how can I fix it?

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Matt Pramschufer

    (@mattpramschufer)

    Hey @flabernardez any chance you can look at your error_log and let me know what the error message is? Are you editing a page just using the Classic Editor or through the Block Editor, or another page builder?

    Thread Starter Flavia Bernárdez Rodríguez

    (@flabernardez)

    Hi @mattpramschufer!

    Thanks so much for reply!

    I use the default Block Editor ??

    On the local site, I made a conflict test and it gives the same error. Here the video ??:

    
    [10-May-2022 08:07:25 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_downloadable_products() on null in /Users/flabernardez/Sites/ohyoga/app/public/wp-content/plugins/woocommerce-my-downloads-shortcode/woocommerce-my-downloads.php:97
    Stack trace:
    #0 /Users/flabernardez/Sites/ohyoga/app/public/wp-includes/shortcodes.php(356): Woocommerce_My_Downloads::my_downloads_button_shortcode(Array, '', 'woocommerce-my-...')
    #1 [internal function]: do_shortcode_tag(Array)
    #2 /Users/flabernardez/Sites/ohyoga/app/public/wp-includes/shortcodes.php(228): preg_replace_callback('/\\[(\\[?)(woocom...', 'do_shortcode_ta...', '\n<div class="wp...')
    #3 /Users/flabernardez/Sites/ohyoga/app/public/wp-includes/class-wp-hook.php(307): do_shortcode('\n<div class="wp...')
    #4 /Users/flabernardez/Sites/ohyoga/app/public/wp-includes/plugin.php(189): WP_Hook->apply_filters('\n<div class="wp...', Array)
    #5 /Users/flabernardez/Sites/ohyoga/app/public/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(1811): apply_filters('the_content', '<!-- wp:html - in /Users/flabernardez/Sites/ohyoga/app/public/wp-content/plugins/woocommerce-my-downloads-shortcode/woocommerce-my-downloads.php on line 97
    
    

    Thanks so much for your help and support!

    Plugin Author Matt Pramschufer

    (@mattpramschufer)

    Hey @flabernardez what version of the plugin are you running. As I am looking at https://plugins.trac.www.ads-software.com/browser/woocommerce-my-downloads-shortcode/trunk/woocommerce-my-downloads.php and looking at line 97 and we already check if null. Let me know if you are running the latest version, if you ARE then I will continue to debug, if not please update to latest version.

    Thread Starter Flavia Bernárdez Rodríguez

    (@flabernardez)

    Yeah @mattpramschufer, I have the last one ??

    https://ibb.co/fMpsNRp

    Plugin Author Matt Pramschufer

    (@mattpramschufer)

    @flabernardez could you try to modify the code on line 96 of /plugins/woocommerce-my-downloads/woocommerce-my-downloads.php

    Change

    
    if ( ! is_null( $woocommerce ) ) {
    

    to

    
    if ( ! is_null( $woocommerce->customer ) ) {
    

    And then let me know if that fixes the issue for you.

    Thread Starter Flavia Bernárdez Rodríguez

    (@flabernardez)

    Yeah! @mattpramschufer! It fixed it!

    Thanks so much for your support!

    Plugin Author Matt Pramschufer

    (@mattpramschufer)

    Awesome!
    I will go ahead and release a new version with this patch in place.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Conflict with last WooCommerce / Gutenberg version’ is closed to new replies.