a PHP notice to get your attention

Posted by: chennakumar

20th January 2018, 3:51 pm

chennakumar

@chennakumar

20 Jan 2018
3:51 pm

Hi Richard, Hope you are doing well!

When i select an option in the plugin memberships menu as "Include selected memberships only"  and apply "Allow Free Downloads for these members" in membership plan, i get the following single line bug for multiple times on product category page load. Can you please provide solution?

PHP Notice:  Undefined variable: productID in /home/chennakumar/public_html/wp-content/plugins/som-free-downloads-woocommerce-pro/includes/somdn-compatibility.php on line 328
  • chennakumar

    @chennakumar

    20 Jan 2018
    5:08 pm

    chennakumar said on 20 Jan 2018, 3:51 pm:

    Hi Richard, Hope you are doing well!

    When i select an option in the plugin memberships menu as "Include selected memberships only"  and apply "Allow Free Downloads for these members" in membership plan, i get the following single line bug for multiple times on product category page load. Can you please provide solution?

    PHP Notice:  Undefined variable: productID in /home/chennakumar/public_html/wp-content/plugins/som-free-downloads-woocommerce-pro/includes/somdn-compatibility.php on line 328

    It is solved! I just removed those undefined variable and 'if' class which is of no use in my case i hope. I don't know whether to remove or not, but solved for me.

    	$post_id = $productID;
    
    	if ( ! $post_id ) {
    		global $post;
    		$post_id = $post->ID;
    	}
  • Richard Webster

    @rwebster

    20 Jan 2018
    6:53 pm

    Thanks for the heads up mate, I'll include a fix in the next update 🙂

This topic is closed to new replies.

Looking for Square One Media? Check this post