• Resolved emranch

    (@emranch)


    I am having this issue while I am trying to run this function via API

    	$available_gateways = WC()->payment_gateways->get_available_payment_gateways();
    
    			$result = $available_gateways['stripe']->process_payment(7917, true, true);
    
    What i am trying to achieve is to create order and pay with the stripe via process_payment but i am getting this error in debug 
    
    

    [19-Jul-2020 20:10:52 UTC] PHP Fatal error: Uncaught Error: Call to undefined function wc_add_notice() in /var/www/stage-kitimini/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-gateway-stripe.php:685
    Stack trace:
    #0 /var/www/stage-kitimini/wp-content/themes/kitimimi/functions.php(2361): WC_Gateway_Stripe->process_payment(7917, true, true)
    #1 /var/www/stage-kitimini/wp-includes/rest-api/class-wp-rest-server.php(946): chargeCard(Object(WP_REST_Request))
    #2 /var/www/stage-kitimini/wp-includes/rest-api/class-wp-rest-server.php(329): WP_REST_Server->dispatch(Object(WP_REST_Request))
    #3 /var/www/stage-kitimini/wp-includes/rest-api.php(305): WP_REST_Server->serve_request(‘/charge/card’)
    #4 /var/www/stage-kitimini/wp-includes/class-wp-hook.php(288): rest_api_loaded(Object(WP))
    #5 /var/www/stage-kitimini/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(NULL, Array)
    #6 /var/www/stage-kitimini/wp-includes/plugin.php(544): WP_Hook->do_action(Array)
    #7 /var/www/stage-kitimini/wp-includes/class-wp.php(387): do_action_ref_array(‘parse_reque in /var/www/stage-kitimini/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-gateway-stripe.php on line 685

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Call to undefined function wc_add_notice()’ is closed to new replies.