hogava Posted May 26, 2019 Share Posted May 26, 2019 hi, This Hook runing when we accept order, Now I need to get order date from tblorders table (database) when i accept order, How can i do it? <?php add_hook('AcceptOrder', 1, function($vars) { // Perform hook code here... }); thanks 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted May 26, 2019 Share Posted May 26, 2019 AcceptOrder returns the ID of the order that you can use to retreive the date like follows. <?php use WHMCS\Database\Capsule; add_hook('AcceptOrder', 1, function($vars) { $OrderDate = Capsule::table('tblorders')->where('id', $vars['orderid'])->value('date'); }); 1 Quote Link to comment Share on other sites More sharing options...
hogava Posted May 26, 2019 Author Share Posted May 26, 2019 please help about insert new value to order & show value in WHMCS admin panel. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted May 26, 2019 Share Posted May 26, 2019 Insert what and where? p.s. Interacting with the Database 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.