From 49e60d30639686273306b9cb6cdaeb4cf8eb9552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anamarija=20Papi=C4=87?= Date: Tue, 6 Feb 2024 14:40:21 +0100 Subject: [PATCH 01/10] T-379 add `model_id` to SyncProgress. - add model_id column inside sync_progress table - count synced items by distinct model_id values --- wordpress-plugin/src/DB/SyncProgress.php | 1 + wordpress-plugin/src/Models/SyncProgress.php | 4 +++- wordpress-plugin/src/ScheduledActions.php | 1 + wordpress-plugin/src/Utils.php | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wordpress-plugin/src/DB/SyncProgress.php b/wordpress-plugin/src/DB/SyncProgress.php index d8796d1..8430f63 100644 --- a/wordpress-plugin/src/DB/SyncProgress.php +++ b/wordpress-plugin/src/DB/SyncProgress.php @@ -33,6 +33,7 @@ public static function create_table() { $sql = 'CREATE TABLE ' . static::$table_name . " ( id INT NOT NULL AUTO_INCREMENT, model TEXT NOT NULL, + model_id VARCHAR(191) NOT NULL, status MEDIUMTEXT NOT NULL, message TEXT NOT NULL, data MEDIUMTEXT NOT NULL, diff --git a/wordpress-plugin/src/Models/SyncProgress.php b/wordpress-plugin/src/Models/SyncProgress.php index 19d5721..a918fc1 100644 --- a/wordpress-plugin/src/Models/SyncProgress.php +++ b/wordpress-plugin/src/Models/SyncProgress.php @@ -16,6 +16,7 @@ class SyncProgress extends Model { public static $columns_format = array( 'id' => '%d', 'model' => '%s', + 'model_id' => '%s', 'status' => '%s', 'message' => '%s', 'data' => '%s', @@ -27,6 +28,7 @@ class SyncProgress extends Model { public static $validation_rules = array( 'model' => 'required|in:product,product-collection,product-variant,region,thumbnail', + 'model_id' => 'required|string', 'status' => 'required|in:syncing,success,error', 'message' => 'required|string', 'data' => 'required|string', @@ -114,7 +116,7 @@ public static function count_all_synced( int $sync_timestamp ) { $wpdb->get_var( $wpdb->prepare( // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - "SELECT COUNT(*) FROM $table_name WHERE sync_timestamp = %d", + "SELECT COUNT(DISTINCT model_id) FROM $table_name WHERE sync_timestamp = %d", $sync_timestamp ) ) diff --git a/wordpress-plugin/src/ScheduledActions.php b/wordpress-plugin/src/ScheduledActions.php index 39676e0..77a2851 100644 --- a/wordpress-plugin/src/ScheduledActions.php +++ b/wordpress-plugin/src/ScheduledActions.php @@ -63,6 +63,7 @@ public static function import_product_thumbnail( string $product_id, ?int $sync_ $processing_item_id = Models\SyncProgress::save( array( 'model' => 'thumbnail', + 'model_id' => $product_id, 'message' => 'Syncing thumbnail of ' . $product_id . ' product...', 'status' => 'syncing', 'data' => $product ? wp_json_encode( $product ) : array( 'id' => $product_id ), diff --git a/wordpress-plugin/src/Utils.php b/wordpress-plugin/src/Utils.php index 79f1133..e798386 100644 --- a/wordpress-plugin/src/Utils.php +++ b/wordpress-plugin/src/Utils.php @@ -219,6 +219,7 @@ public static function save_sync_progress( string $model, array $data, ?int $syn return Models\SyncProgress::save( array( 'model' => $model, + 'model_id' => $data['id'], 'message' => 'Syncing ' . $data['id'] . '...', 'status' => 'syncing', 'data' => wp_json_encode( $data ), From 36b33672d3c88d13574c998a3eceae2aea23aa79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anamarija=20Papi=C4=87?= Date: Wed, 7 Feb 2024 11:44:25 +0100 Subject: [PATCH 02/10] T-379 add `model_id` to sync_message schema. --- wordpress-plugin/src/Routes/Admin/MedusaBulkSync.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wordpress-plugin/src/Routes/Admin/MedusaBulkSync.php b/wordpress-plugin/src/Routes/Admin/MedusaBulkSync.php index f4c3f91..a981f3a 100644 --- a/wordpress-plugin/src/Routes/Admin/MedusaBulkSync.php +++ b/wordpress-plugin/src/Routes/Admin/MedusaBulkSync.php @@ -44,6 +44,7 @@ private function get_sync_message_schema() { 'ended_at', 'medusa_admin_link', 'model', + 'model_id', ), 'properties' => array( 'id' => array( @@ -54,6 +55,10 @@ private function get_sync_message_schema() { 'type' => 'string', 'description' => __( 'Sync message model.', 'medusawp' ), ), + 'model_id' => array( + 'type' => 'string', + 'description' => __( 'Sync message model id.', 'medusawp' ), + ), 'status' => array( 'type' => 'string', 'description' => __( 'Sync message status.', 'medusawp' ), From 10aafcd80fe12162374bd6cdbadd3847750e42f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anamarija=20Papi=C4=87?= Date: Mon, 19 Feb 2024 15:51:44 +0100 Subject: [PATCH 03/10] phpmyadmin support for M1/M2. - fix problem with running phpmyadmin in Docker with Rosetta emulation on Apple chips --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index be77b29..3575ba4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -84,7 +84,7 @@ services: profiles: ["wp"] phpmyadmin: - image: phpmyadmin/phpmyadmin + image: phpmyadmin:latest ports: - 8080:80 links: From b311ff4479ab71f37af7876fbfce5ebb7833a36d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anamarija=20Papi=C4=87?= Date: Mon, 19 Feb 2024 15:52:46 +0100 Subject: [PATCH 04/10] switch to mysql 8.0. - supports Apple chips --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3575ba4..a6ac892 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -69,7 +69,7 @@ services: profiles: ["wp"] db: - image: mariadb:10.4 + image: mysql:8.0 ports: - 3306:3306 volumes: From 1e1f9a2c1ba7b3ad91320bcf5c8a3add4743a636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anamarija=20Papi=C4=87?= Date: Mon, 19 Feb 2024 15:57:37 +0100 Subject: [PATCH 05/10] T-380 separate sync progress messages into its own endpoint. - add sync-progress/messages endpoint - implement pagination --- wordpress-plugin/src/Models/SyncProgress.php | 56 +++++++- .../src/Routes/Admin/MedusaBulkSync.php | 128 ++++++++++++++++-- 2 files changed, 170 insertions(+), 14 deletions(-) diff --git a/wordpress-plugin/src/Models/SyncProgress.php b/wordpress-plugin/src/Models/SyncProgress.php index a918fc1..033aae8 100644 --- a/wordpress-plugin/src/Models/SyncProgress.php +++ b/wordpress-plugin/src/Models/SyncProgress.php @@ -123,21 +123,71 @@ public static function count_all_synced( int $sync_timestamp ) { ); } - public static function get_sync_progress_troubleshoot_messages( int $sync_timestamp ) { + public static function get_troubleshoot_messages( int $sync_timestamp, $options = array() ) { /** * @var \wpdb $wpdb */ global $wpdb; $table_name = static::$table_name; + if ( empty( $options ) ) { + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + return $wpdb->get_results( + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + "SELECT * FROM $table_name" + ), + ARRAY_A + ); + } + + $default_options = array( + 'page' => 1, + 'per_page' => get_option( 'posts_per_page', 10 ), + ); + + $options = array_merge( $default_options, $options ); + + $options['page'] = abs( intval( $options['page'] ) ); + $options['per_page'] = abs( intval( $options['per_page'] ) ); + + if ( $options['per_page'] < 1 ) { + $options['per_page'] = $default_options['per_page']; + } + + if ( $options['page'] < 1 ) { + $options['page'] = $default_options['page']; + } + + $offset = ( $options['page'] - 1 ) * $options['per_page']; + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching return $wpdb->get_results( $wpdb->prepare( // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared - "SELECT * FROM $table_name WHERE sync_timestamp = %d AND status = 'error' ORDER BY started_at DESC;", - array( $sync_timestamp ) + "SELECT * FROM $table_name WHERE sync_timestamp = %d AND status = 'error' ORDER BY started_at DESC LIMIT %d OFFSET %d;", + array( $sync_timestamp, $options['per_page'], $offset ) ), 'ARRAY_A' ); } + + public static function count_troubleshoot_messages( int $sync_timestamp ) { + /** + * @var \wpdb $wpdb + */ + global $wpdb; + $table_name = static::$table_name; + + return intval( + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + $wpdb->get_var( + $wpdb->prepare( + // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared + "SELECT COUNT(*) FROM $table_name WHERE sync_timestamp = %d AND status = 'error'", + $sync_timestamp + ) + ) + ); + } } diff --git a/wordpress-plugin/src/Routes/Admin/MedusaBulkSync.php b/wordpress-plugin/src/Routes/Admin/MedusaBulkSync.php index a981f3a..31e3a5f 100644 --- a/wordpress-plugin/src/Routes/Admin/MedusaBulkSync.php +++ b/wordpress-plugin/src/Routes/Admin/MedusaBulkSync.php @@ -126,7 +126,7 @@ public function sync_messages_schema() { ); } - private function get_sync_response_object_schema( $with_messages = false ) { + private function get_sync_response_object_schema() { $title = 'MedusaWPSyncResponse'; $required = array( 'started_at', @@ -256,15 +256,6 @@ private function get_sync_response_object_schema( $with_messages = false ) { ), ); - if ( $with_messages ) { - $title = 'MedusaWPSyncResponseWithMessages'; - $required[] = 'messages'; - $properties['messages'] = array( - 'type' => 'array', - 'items' => $this->get_sync_message_schema(), - ); - } - return array( 'title' => $title, 'type' => 'object', @@ -305,6 +296,40 @@ public function sync_progress_response_schema() { ); } + public function sync_progress_messages_response_schema() { + return array( + '$schema' => 'http://json-schema.org/draft-04/schema#', + 'title' => 'MedusaWPSyncProgressMessagesResponse', + 'type' => 'object', + 'additionalProperties' => false, + 'required' => array( + 'messages', + 'total', + 'current_page', + 'last_page', + ), + 'properties' => array( + 'messages' => array( + 'type' => 'array', + 'items' => $this->get_sync_message_schema(), + 'description' => __( 'Messages.', 'medusawp' ), + ), + 'total' => array( + 'type' => 'number', + 'description' => __( 'Total number of messages.', 'medusawp' ), + ), + 'current_page' => array( + 'type' => 'number', + 'description' => __( 'Current page.', 'medusawp' ), + ), + 'last_page' => array( + 'type' => 'number', + 'description' => __( 'Last page.', 'medusawp' ), + ), + ), + ); + } + public function register_admin_routes() { register_rest_route( $this->namespace, @@ -374,6 +399,33 @@ public function register_admin_routes() { ), ); + register_rest_route( + $this->namespace, + '/sync-progress/messages', + array( + array( + 'methods' => 'GET', + 'callback' => array( $this, 'get_sync_progress_messages' ), + 'args' => array( + 'page' => array( + 'type' => 'integer', + 'required' => false, + 'default' => 1, + ), + 'per_page' => array( + 'type' => 'integer', + 'required' => false, + 'default' => intval( get_option( 'posts_per_page', 10 ) ), + ), + ), + 'permission_callback' => function () { + return current_user_can( 'manage_options' ); + }, + ), + 'schema' => array( $this, 'sync_progress_messages_response_schema' ), + ), + ); + register_rest_route( $this->namespace, '/remove-synced', @@ -602,13 +654,67 @@ public function get_sync_progress() { 'totals' => $progress['totals'], 'synced' => $synced, 'import_thumbnails' => $progress['type'] === 'bulk_sync_and_import_thumbnails' || $progress['type'] === 'import_thumbnails', - 'messages' => SyncProgress::get_sync_progress_troubleshoot_messages( $sync_timestamp ), 'type' => $progress['type'], ), ) ); } + /** + * Route callback: Get sync progress messages. + * + * @param \WP_REST_Request $req + * @return WP_REST_Response + */ + public function get_sync_progress_messages( $req ) { + $progress = Settings::get_sync_progress(); + $sync_timestamp = $progress['started_at']; + + $params = $req->get_params(); + + /** + * @var int + */ + $page = $params['page']; + + /** + * @var int + */ + $per_page = $params['per_page']; + + $total_records = SyncProgress::count_troubleshoot_messages( $sync_timestamp ); + + $total_pages = ceil( $total_records / $per_page ); + + $options = array( + 'page' => $page, + 'per_page' => $per_page, + ); + + $options['page'] = filter_var( + $page, + FILTER_VALIDATE_INT, + array( + 'options' => array( + 'default' => $page > $total_pages ? $total_pages : 1, + 'min_range' => 1, + 'max_range' => $total_pages, + ), + ) + ); + + $messages = SyncProgress::get_troubleshoot_messages( $sync_timestamp, $options ); + + return new WP_REST_Response( + array( + 'messages' => $messages, + 'total' => $total_records, + 'current_page' => $options['page'], + 'last_page' => $total_pages, + ) + ); + } + /** * Route callback: Remove synced data. * From 9f9f3654e3f9897c4430ccd9c7f3c79e5ba46e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anamarija=20Papi=C4=87?= Date: Wed, 21 Feb 2024 15:24:12 +0100 Subject: [PATCH 06/10] T-379 make `model_id` column nullable. --- wordpress-plugin/src/DB/SyncProgress.php | 2 +- wordpress-plugin/src/Models/SyncProgress.php | 2 +- wordpress-plugin/src/Routes/Admin/MedusaBulkSync.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wordpress-plugin/src/DB/SyncProgress.php b/wordpress-plugin/src/DB/SyncProgress.php index 8430f63..640ed55 100644 --- a/wordpress-plugin/src/DB/SyncProgress.php +++ b/wordpress-plugin/src/DB/SyncProgress.php @@ -33,7 +33,7 @@ public static function create_table() { $sql = 'CREATE TABLE ' . static::$table_name . " ( id INT NOT NULL AUTO_INCREMENT, model TEXT NOT NULL, - model_id VARCHAR(191) NOT NULL, + model_id VARCHAR(191), status MEDIUMTEXT NOT NULL, message TEXT NOT NULL, data MEDIUMTEXT NOT NULL, diff --git a/wordpress-plugin/src/Models/SyncProgress.php b/wordpress-plugin/src/Models/SyncProgress.php index 033aae8..aa3c03a 100644 --- a/wordpress-plugin/src/Models/SyncProgress.php +++ b/wordpress-plugin/src/Models/SyncProgress.php @@ -28,7 +28,7 @@ class SyncProgress extends Model { public static $validation_rules = array( 'model' => 'required|in:product,product-collection,product-variant,region,thumbnail', - 'model_id' => 'required|string', + 'model_id' => 'nullable|string', 'status' => 'required|in:syncing,success,error', 'message' => 'required|string', 'data' => 'required|string', diff --git a/wordpress-plugin/src/Routes/Admin/MedusaBulkSync.php b/wordpress-plugin/src/Routes/Admin/MedusaBulkSync.php index 31e3a5f..c40cbbe 100644 --- a/wordpress-plugin/src/Routes/Admin/MedusaBulkSync.php +++ b/wordpress-plugin/src/Routes/Admin/MedusaBulkSync.php @@ -56,7 +56,7 @@ private function get_sync_message_schema() { 'description' => __( 'Sync message model.', 'medusawp' ), ), 'model_id' => array( - 'type' => 'string', + 'type' => array( 'string', 'null' ), 'description' => __( 'Sync message model id.', 'medusawp' ), ), 'status' => array( From de29720f76973b2699bd3b553e54d373c5c215d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anamarija=20Papi=C4=87?= Date: Wed, 21 Feb 2024 16:05:48 +0100 Subject: [PATCH 07/10] T-379 `model_id` required in validation rules. --- wordpress-plugin/src/Models/SyncProgress.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wordpress-plugin/src/Models/SyncProgress.php b/wordpress-plugin/src/Models/SyncProgress.php index aa3c03a..033aae8 100644 --- a/wordpress-plugin/src/Models/SyncProgress.php +++ b/wordpress-plugin/src/Models/SyncProgress.php @@ -28,7 +28,7 @@ class SyncProgress extends Model { public static $validation_rules = array( 'model' => 'required|in:product,product-collection,product-variant,region,thumbnail', - 'model_id' => 'nullable|string', + 'model_id' => 'required|string', 'status' => 'required|in:syncing,success,error', 'message' => 'required|string', 'data' => 'required|string', From 1dae00799723eafd456a471363a9cde34678c79c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anamarija=20Papi=C4=87?= Date: Fri, 15 Mar 2024 11:39:29 +0100 Subject: [PATCH 08/10] Fix repeating PHP Warning - PHP Warning: Undefined array key "isEntry" --- wordpress-plugin/src/Admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wordpress-plugin/src/Admin.php b/wordpress-plugin/src/Admin.php index b4571b3..a441c24 100755 --- a/wordpress-plugin/src/Admin.php +++ b/wordpress-plugin/src/Admin.php @@ -154,7 +154,7 @@ function () { if ( ! empty( $manifest ) && is_array( $manifest ) ) { foreach ( $manifest as $key => $value ) { - if ( $value['isEntry'] ) { + if ( array_key_exists( 'isEntry', $value ) && $value['isEntry'] ) { wp_enqueue_script( 'medusawp-' . $key, plugins_url( 'admin/dist/' . $value['file'], MEDUSAWP_PLUGIN_DIR . '/index.php' ), array(), MEDUSAWP_VERSION, true ); wp_localize_script( 'medusawp-' . $key, 'medusawp', $this->get_medusawp_js_data() ); From 68a3da56c5bfd7cc6eac3b41b10cc5a78267bd4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anamarija=20Papi=C4=87?= Date: Fri, 15 Mar 2024 11:40:08 +0100 Subject: [PATCH 09/10] Add missing dependencies - date-fns, lodash.range --- package-lock.json | 16 ++++++++++++++++ wordpress-plugin/package.json | 2 ++ 2 files changed, 18 insertions(+) diff --git a/package-lock.json b/package-lock.json index 2ef2b97..032be18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25188,6 +25188,11 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, + "node_modules/lodash.range": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.range/-/lodash.range-3.2.0.tgz", + "integrity": "sha512-Fgkb7SinmuzqgIhNhAElo0BL/R1rHCnhwSZf78omqSwvWqD0kD2ssOAutQonDKH/ldS8BxA72ORYI09qAY9CYg==" + }, "node_modules/lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", @@ -36299,6 +36304,8 @@ "@radix-ui/react-collapsible": "^1.0.3", "@radix-ui/react-popover": "^1.0.7", "@tanstack/react-query": "^5.13.4", + "date-fns": "^3.3.1", + "lodash.range": "^3.2.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-hook-form": "^7.49.0", @@ -36327,6 +36334,15 @@ "vite": "^5.0.12", "vite-tsconfig-paths": "^4.2.2" } + }, + "wordpress-plugin/node_modules/date-fns": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.3.1.tgz", + "integrity": "sha512-y8e109LYGgoQDveiEBD3DYXKba1jWf5BA8YU1FL5Tvm0BTdEfy54WLCwnuYWZNnzzvALy/QQ4Hov+Q9RVRv+Zw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/kossnocorp" + } } } } diff --git a/wordpress-plugin/package.json b/wordpress-plugin/package.json index 1a808ad..2048e15 100644 --- a/wordpress-plugin/package.json +++ b/wordpress-plugin/package.json @@ -26,6 +26,8 @@ "@radix-ui/react-collapsible": "^1.0.3", "@radix-ui/react-popover": "^1.0.7", "@tanstack/react-query": "^5.13.4", + "date-fns": "^3.3.1", + "lodash.range": "^3.2.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-hook-form": "^7.49.0", From 4115e86281632d3eb995036b8c69748d91bd575d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anamarija=20Papi=C4=87?= Date: Fri, 15 Mar 2024 11:44:18 +0100 Subject: [PATCH 10/10] Add `lodash` dependency --- package-lock.json | 7 +------ wordpress-plugin/package.json | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 032be18..5664ca0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25188,11 +25188,6 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, - "node_modules/lodash.range": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.range/-/lodash.range-3.2.0.tgz", - "integrity": "sha512-Fgkb7SinmuzqgIhNhAElo0BL/R1rHCnhwSZf78omqSwvWqD0kD2ssOAutQonDKH/ldS8BxA72ORYI09qAY9CYg==" - }, "node_modules/lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", @@ -36305,7 +36300,7 @@ "@radix-ui/react-popover": "^1.0.7", "@tanstack/react-query": "^5.13.4", "date-fns": "^3.3.1", - "lodash.range": "^3.2.0", + "lodash": "^4.17.21", "react": "^18.2.0", "react-dom": "^18.2.0", "react-hook-form": "^7.49.0", diff --git a/wordpress-plugin/package.json b/wordpress-plugin/package.json index 2048e15..da7c9d3 100644 --- a/wordpress-plugin/package.json +++ b/wordpress-plugin/package.json @@ -27,7 +27,7 @@ "@radix-ui/react-popover": "^1.0.7", "@tanstack/react-query": "^5.13.4", "date-fns": "^3.3.1", - "lodash.range": "^3.2.0", + "lodash": "^4.17.21", "react": "^18.2.0", "react-dom": "^18.2.0", "react-hook-form": "^7.49.0",