2
に配置された後、私は私のカスタムテーブルに挿入する必要がありますが、私は使用だけに挿入値の順序がWoocommerce
add_action('woocommerce_order_status_completed', 'my_function');
function my_function($order_id) {
global $wpdb;
$order = new WC_order($order_id);
$customer_id= $order->id;
$email= $order->billing_email;
$email1= $order->id;
$table_name = "aitoe_license_table";
$wpdb->insert($table_name, array(
'username' => $customer_id,
'order_id' => $email,
'number_of_cameras' => 12,
'boolean' => 'False',
));
}