varunsridharan / woocommerce-quick-donation

Online Donation Using Woocoomerce. for woocommerce user's
https://wordpress.org/plugins/woocommerce-quick-donation
GNU General Public License v2.0
7 stars 11 forks source link

Does not show the menu in the admin menu settings #103

Open jon4god opened 7 years ago

jon4god commented 7 years ago

You need to add if (! $ Woocommerce ||! Isset ($ woocommerce-> cart)) return; in woocommerce-quick-donation.php

/**
 * Checks If Donation Product Exists In Cart
 */
public function check_donation_exists_cart(){
    global $woocommerce;
    $found = false;
    if( ! $woocommerce || !isset($woocommerce->cart) ) return;
    if( sizeof($woocommerce->cart->get_cart()) > 0){
        foreach($woocommerce->cart->get_cart() as $cart_item_key=>$values){
            $_product = $values['data'];
            if($_product->id == self::$donation_id)
                $found = true;
        }

    }
    return $found;
}
varunsridharan commented 7 years ago

Hi,

Thanks for the fix.

As you already seen its too old plugin. but i have made a brand new version with many improvements and changes. if you are interested in testing it. please do ping me @ skype : varunsridharan23