You may need to set page/page id for woocommerce_pay_page_id by using add_option('woocommerce_pay_page_id', $page_id) any where in your custom plugin.
Hope will sort out your issue.
Domanda
I am trying to develop wordpress woo-commerce payment gateway. After I complete transaction, here is my code.
`$order->update_status('on-hold',__('verifying transaction', 'woocommerce'));`
after the event is done, an json object gets displayed in the page
`{"result":"failure","messages":"","refresh":"false","reload":"false"}`
I try to set the result as 'success' but that failure result kept returning. could anyone give me suggestion where I have to look at?
here is the whole code,
$order->update_status('on-hold',__('verifying transaction', 'woocommerce'));
return array('result' => 'success',
'redirect' => add_query_arg('order',$order->id, add_query_arg('key', $order->order_key, get_permalink(get_option('woocommerce_pay_page_id'))))
);
Nessuna soluzione corretta
Altri suggerimenti
You may need to set page/page id for woocommerce_pay_page_id by using add_option('woocommerce_pay_page_id', $page_id) any where in your custom plugin.
Hope will sort out your issue.