Can't create coupons

I can't create coupons - it doesn't give me any error messages but when I try to create a coupon i just get returned to an empty coupon list.

This is lower priority than the other 2 bugs I raised.

  • dhilditch
    • Design Lord, Child of Thor

    Hi - tried this but the coupons still don't work.

    I enabled wordpress debugging - the only error message I'm getting is placed next to the 'currency selector' for choosing the discount amount:

    Notice: Undefined index: paymentcurrency in /var/www/vhosts/matiogiwp.uk.vps.securepod.com/affiliatewebdesigners/wp-content/plugins/membership/membershipincludes/classes/class.coupon.php on line 217

    When I try to add a coupon (i've tried MANY varieties of parameters) I get a yellow message saying 'Coupon Added' but the coupon list is empty.

  • PC
    • WPMU DEV Initiate

    Hello @dhilditch

    Apologies on having missed your last post on this one.

    Are you using the plugin on a single site or a wordpress multisite ?

    If you are using on a single site, then this is what you need to do

    /membership/membershipincludes/classes/membershipadmin.php Line 6811:

    if(!is_network_admin()) {
    	// We are on a single site admin interface
    	$sql .= $this->db->prepare( "WHERE site_id = %d", $this->db->blogid );
    }

    You're on a single site install, so when your not a network admin it was then trying to add the WHERE is the SQL statement.

    So it can either be removed for now or changed to:

    if(is_network_admin()) {
    	// We are on a single site admin interface
    	$sql .= $this->db->prepare( "WHERE site_id = %d", $this->db->blogid );
    }

    That will work as a temporary solution until Barry makes a more permanent fix.

    Thanks to Timothy for this solution

    The same issue is being discussed here : https://premium.wpmudev.org/forums/topic/the-coupon-code-manager-overview-page-will-not-display-added-coupons-on-a-fresh-342-wordpress-install

    I hope that helps.

    Cheers, PC

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.