From 2a76416b5a159babbdd743d13a801872608d5bb2 Mon Sep 17 00:00:00 2001 From: rockwellll Date: Thu, 10 Apr 2025 18:27:03 +0300 Subject: [PATCH] change permission of the API key from read to read_write --- changelog.txt | 4 ++++ src/Events/AppInstalled.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index f43466f..3f36e9b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,9 @@ ** Hellotext for WooCommerce Changelog ** +2025-04-10 - version 1.2.2 + +* The generated Hellotext API key has read/write access to allow Hellotext to subscribe to webhooks. + 2025-04-9 - version 1.2.1 * Passes the shop's currency to Hellotext API when the plugin is installed. diff --git a/src/Events/AppInstalled.php b/src/Events/AppInstalled.php index 6884226..ef6534b 100644 --- a/src/Events/AppInstalled.php +++ b/src/Events/AppInstalled.php @@ -33,7 +33,7 @@ function hellotext_activate () { $wpdb->insert($api_keys_table, [ 'user_id' => get_current_user_id(), 'description' => 'Hellotext', - 'permissions' => 'read', + 'permissions' => 'read_write', 'consumer_key' => wc_api_hash($conusmer_key), 'consumer_secret' => $api_keys->consumer_secret, 'truncated_key' => substr($api_keys->consumer_key, -7),