| @@ -1,10 +1,10 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * Plugin Name: SQL Chart Builder |
| 4 | 4 | * Plugin URI: http://guaven.com/updatepusher |
| 5 | - * Description: Turn Your SQL Queries into Beautiful Dynamic Charts- Pie, Line, Area, Donut, Bar, Polar Charts with date/input filters. | |
| 6 | - * Version: 2.3.7.2 | |
| 5 | + * Description: Turn Your SQL Queries into Beautiful Dynamic Charts - Pie, Doughnut, Line, Area, Stepped, Bar, Stacked, Radar, Polar and Scatter charts with a visual SQL builder, autocomplete and date/input filters. | |
| 6 | + * Version: 3.0.5 | |
| 7 | 7 | * Author: Guaven Labs |
| 8 | 8 | * Author URI: http://guaven.com/ |
| 9 | 9 | * Text Domain: guaven_sqlcharts |
| 10 | 10 | * License: GPLv2 or later |
| @@ -15,55 +15,8 @@ | ||
| 15 | 15 | if ( ! defined( 'WPINC' ) ) { |
| 16 | 16 | die; |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | -define('GVNSQLCHARTS_VERSION','2.3.7.2'); | |
| 19 | +define('GVNSQLCHARTS_VERSION','3.0.5'); | |
| 20 | 20 | |
| 21 | 21 | |
| 22 | 22 | require_once(dirname(__FILE__)."/functions.php"); |
| 23 | - | |
| 24 | -add_action('woocommerce_order_status_completed', 'send_billink_workflow_request', 10, 1); | |
| 25 | - | |
| 26 | -function send_billink_workflow_request($order_id) { | |
| 27 | - $url = 'https://api.billink.nl/v2/client/workflow/start'; | |
| 28 | - | |
| 29 | - // Get the order object | |
| 30 | - $order = wc_get_order($order_id); | |
| 31 | - | |
| 32 | - if (!$order) { | |
| 33 | - return; // Exit if the order object is invalid | |
| 34 | - } | |
| 35 | - | |
| 36 | - // JSON payload | |
| 37 | - $payload = array( | |
| 38 | - 'billinkUsername' => 'Compliment', | |
| 39 | - 'billinkID' => '3aaa125cf4e3a6fd0891975e9299a0c42bc4e790', | |
| 40 | - 'invoices' => array( | |
| 41 | - array( | |
| 42 | - 'number' => $order->get_meta('_payment_method'), | |
| 43 | - 'workflowNumber' => 1 | |
| 44 | - ) | |
| 45 | - ) | |
| 46 | - ); | |
| 47 | - | |
| 48 | - // Prepare arguments for wp_remote_post | |
| 49 | - $args = array( | |
| 50 | - 'method' => 'POST', | |
| 51 | - 'body' => wp_json_encode($payload), | |
| 52 | - 'headers' => array( | |
| 53 | - 'Content-Type' => 'application/json', | |
| 54 | - ), | |
| 55 | - 'timeout' => 45, | |
| 56 | - ); | |
| 57 | - | |
| 58 | - // Make the POST request | |
| 59 | - var_dump($url, $args);die(); | |
| 60 | - //$response = wp_remote_post($url, $args); | |
| 61 | - | |
| 62 | - // Log the response or handle it as needed | |
| 63 | - if (is_wp_error($response)) { | |
| 64 | - error_log('Billink API Error: ' . $response->get_error_message()); | |
| 65 | - } else { | |
| 66 | - $response_body = wp_remote_retrieve_body($response); | |
| 67 | - error_log('Billink API Response: ' . $response_body); | |
| 68 | - } | |
| 69 | -} | |