Not working
-
I haven’t heard any issues with this and WC 3.1 can you tell me what it is or is not doing?
Hi. Thanks for reply.
I have WC 3.1 and WP 4.6.7
When i use [woocommerce-my-downloads] in user’s download page/ get following error.Fatal error: Call to a member function get_downloadable_products() on null in /home3/xxxxxxxx/public_html/wp-content/plugins/woocommerce-my-downloads-shortcode/tpl/my-downloads.php on line 2
This error appear when i want to save page that include this shortcode.
Okay, let me investigate and get back to you in a few.
Thank you
Okay, I can not reproduce this at all. But have something to try. Can you change line 54 of woocommerce-my-downloads.php
Instead of it being
global $woocommerce;
let’s change that to be$woocommerce = WC();
Let me know if that works for your situation. If it does I will push out new version of plugin.
I just pushed out a update to plugin, just maintenance release, see if that corrects your issue.
Thank you But i still have it. I’m now have 1.4 version But when i update page that includes
[woocommerce-my-downloads]
shortcode, I get that error.But in my download pages, links are customized. Actually, it’s working but still have an error. Anyway Thanks for reply and update.
- This reply was modified 7 years, 2 months ago by mahdiagho.
Mahdiagho,
I am sorry to hear that, is it still the same error message? Also, what do you mean when you say your download pages and links are customized? Did you modify the templates that came with the plugin or are you just using CSS to style them?Thanks for Following up.
Yes its the same error. I’m using Flatsome 3.3.9 theme and using your original plugin’s theme for download page but making some customization with CSS.
When i create and publish the page with this shortcode ([woocommerce-my-downloads]
), this error [Fatal error: Call to a member function get_downloadable_products() on null in /home3/******/public_html/wp-content/plugins/woocommerce-my-downloads-shortcode/tpl/my-downloads.php on line 2
] shooted to my screen and get the white screen! But after this, By opening that page using its permalink, my download links appears with your plugin theme.
I wish i could imply my purpose.Ahh, okay… any chance you have one of those optimizer plugins running which says only load WooCommerce files on WooCommerce pages?
And just so I am clear, the shortcode on the front-end of the site works as it is intended, it is just when you are saving the shortcode on the page in WP Admin?
I just pushed out a new version which I wrap the $woocommerce variable to suppress that error if woocommerce is not loaded.
Yes, it’s only in back-end. But i can’t understand you when you say
any chance you have one of those optimizer plugins running which says only load WooCommerce files on WooCommerce pages?
I update plugin to 1.5 and that error changed to this:
Fatal error: Call to a member function get_downloadable_products() on null in /home3/******/public_html/wp-content/plugins/woocommerce-my-downloads-shortcode/woocommerce-my-downloads.php on line 58
Sorry but I am out of option to try to debug for you. Is this on a production site you can give me access to or is this only on your local machine? If you want you can send me temp credentials and I can take a look for you.
- The topic ‘Not working’ is closed to new replies.