• Resolved charlyox

    (@charlyox)


    Hello there,

    On your plugin which I a m eager to discover, I have this on activation:

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method WPUW::register_terms() should not be called statically in /homepages/34/d504868018/htdocs/cuisine/myfoundrycorner.com/wp-includes/plugin.php on line 496

    Anyway, this does not prevent me from continuing navigating on my admin.

    Thanks a lot

    Charles

    https://www.ads-software.com/plugins/user-waller-credit-system/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter charlyox

    (@charlyox)

    By the way, I am using WP 4.1.1 and WooCommerce 2.3.7, and this plugin 1.2.
    I have resolved this error this way:

    user-wallet-main.php line 30: replace

    add_action('wp_loaded', array(__CLASS__, 'register_scripts'));
    		add_action('wp_loaded', array(__CLASS__, 'register_styles'));
    		add_action('init', array(__CLASS__, 'includes'));
    		add_action('init', array(__CLASS__, 'register_terms'));
    		add_action( 'admin_notices', array($this, 'admin_notice') );

    by:

    add_action('wp_loaded', array($this, 'register_scripts'));
    	add_action('wp_loaded', array($this, 'register_styles'));
    	add_action('init', array(__CLASS__, 'includes'));
    	add_action('init', array($this, 'register_terms'));
            add_action( 'admin_notices', array($this, 'admin_notice') );

    Also, later I have been facing another error related to deprecated woocommerce function and filter certainly due to my fresh version of WooCommerce:

    in includes/filters.php line 24

    replace:

    add_filter ('add_to_cart_redirect ', 'uw_redirect_to_checkout');
    function uw_redirect_to_checkout ()
    {
    	if(isset($_POST['uw_add_product']))
    	{
    		$product_id = (int) apply_filters('woocommerce_add_to_cart_product_id', $_POST['add-to-cart']);
    		if( has_term( 'credit', 'product_cat', $product_id ) )
    		{
    			global $woocommerce;
    			$woocommerce->clear_messages();
    			return $woocommerce->cart->get_checkout_url();
    		}
    }
    }

    by:

    add_filter ('woocommerce_add_to_cart_redirect', 'uw_redirect_to_checkout');
    function uw_redirect_to_checkout ()
    {
    	if(isset($_POST['uw_add_product']))
    	{
    		$product_id = (int) apply_filters('woocommerce_add_to_cart_product_id', $_POST['add-to-cart']);
    		if( has_term( 'credit', 'product_cat', $product_id ) )
    		{
    			global $woocommerce;
                            wc_clear_notices();
    			return $woocommerce->cart->get_checkout_url();
    		}
    }
    }

    Thanks a lot, great plugin! Keep updated!

    Hello,
    The problem persists, the plugin code needs to be updated

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘error on activation’ is closed to new replies.