Class ‘LLMS_Admin_Metabox’ not found
-
Hello, I have an issue here. When i try to manually confirm the order and record transaction from MY plugin the llms return this :
Fatal error: Class 'LLMS_Admin_Metabox' not found in /home/user/project/wp-content/plugins/lifterlms/includes/admin/post-types/meta-boxes/class.llms.meta.box.engagement.php on line 10If i try to confirm the order and record transaction from the backend(Admin User) everything is normal. I tried to hook at ‘lifterlms_init’,’lifterlms_loaded’, the error is the same. Basically i am trying to confirm multiple orders. Here is my code :
foreach ($ara as $value) { $orderID = $value->order_id; $orderC = new \LLMS_Order($orderID); //Set causes the error ! $orderC->set('status','llms-completed'); unset($orderC); $orderC = new \LLMS_Order($orderID); $orderC->record_transaction([ 'amount' => $data['PAYMENTINFO_0_AMT'], 'completed_date' => current_time( 'mysql' ), 'customer_id' => $value->student, 'fee_amount' => 0, 'source_id' => 'PayPal', 'source_description' => 'via PayPal', 'transaction_id' => $data['PAYMENTINFO_0_TRANSACTIONID'], 'status' => 'llms-txn-succeeded', 'payment_gateway' => 'PayPal', 'payment_type' => 'single', ]); $count++; } if ($count == count($ara)) { return true; } else { return false; }P.S Sometimes it confirm only the first order from the array but dies on the second without event handle the transaction on the first. Thanks in advance !
The topic ‘Class ‘LLMS_Admin_Metabox’ not found’ is closed to new replies.