Commit 0c749ed62b for woocommerce
commit 0c749ed62b31de6a232f4ab7a306ab3d002abcff
Author: Brandon Kraft <public@brandonkraft.com>
Date: Thu Feb 5 04:13:30 2026 -0600
Remove orphaned email tracker REST endpoint (#63071)
* Remove orphaned email tracker REST endpoint
Follow-up to #55660 which removed the merchant email notes feature.
The `/wc-analytics/admin/notes/tracker/{note_id}/user/{user_id}` endpoint
and its handler were missed during that cleanup.
This endpoint was used to track email opens via an embedded tracking pixel,
but since the email notification system was removed, this endpoint no longer
serves any purpose.
diff --git a/plugins/woocommerce/changelog/remove-orphaned-email-tracker-endpoint b/plugins/woocommerce/changelog/remove-orphaned-email-tracker-endpoint
new file mode 100644
index 0000000000..76381dc4d5
--- /dev/null
+++ b/plugins/woocommerce/changelog/remove-orphaned-email-tracker-endpoint
@@ -0,0 +1,4 @@
+Significance: patch
+Type: dev
+
+Remove orphaned email tracker REST endpoint and deprecate track_opened_email method (follow-up to #55660)
diff --git a/plugins/woocommerce/src/Admin/API/Notes.php b/plugins/woocommerce/src/Admin/API/Notes.php
index 3c21865fcd..c1d8a1cdc0 100644
--- a/plugins/woocommerce/src/Admin/API/Notes.php
+++ b/plugins/woocommerce/src/Admin/API/Notes.php
@@ -114,19 +114,6 @@ class Notes extends \WC_REST_CRUD_Controller {
)
);
- register_rest_route(
- $this->namespace,
- '/' . $this->rest_base . '/tracker/(?P<note_id>[\d-]+)/user/(?P<user_id>[\d-]+)',
- array(
- array(
- 'methods' => \WP_REST_Server::READABLE,
- 'callback' => array( $this, 'track_opened_email' ),
- 'permission_callback' => '__return_true',
- ),
- 'schema' => array( $this, 'get_public_item_schema' ),
- )
- );
-
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/update',
@@ -609,19 +596,15 @@ class Notes extends \WC_REST_CRUD_Controller {
return apply_filters( 'woocommerce_rest_prepare_note', $response, $data, $request );
}
-
/**
* Track opened emails.
*
+ * @deprecated 10.6.0 This method is no longer functional as the email tracking feature was removed in WooCommerce 9.9.
+ *
* @param WP_REST_Request $request Request object.
*/
public function track_opened_email( $request ) {
- $note = NotesRepository::get_note( $request->get_param( 'note_id' ) );
- if ( ! $note ) {
- return;
- }
-
- NotesRepository::record_tracks_event_with_user( $request->get_param( 'user_id' ), 'email_note_opened', array( 'note_name' => $note->get_name() ) );
+ wc_deprecated_function( __METHOD__, '10.6.0' );
}
/**