Summary
Two byte-for-byte-equivalent "get a user's artist IDs" wrappers exist in two plugins, both delegating to the canonical ec_get_artists_for_user() with identical bodies:
extrachill_api_shop_get_user_artist_ids( $user_id = null ) — extrachill-api/inc/routes/shop/products.php:148
extrachill_shop_get_user_artist_ids( $user_id = null ) — extrachill-shop/inc/abilities/product-write-helpers.php:62
Both do exactly:
if ( ! $user_id ) { $user_id = get_current_user_id(); }
if ( ! function_exists( 'ec_get_artists_for_user' ) ) { return array(); }
return ec_get_artists_for_user( $user_id );
Why it's debt
Pure duplication of a trivial pass-through across a plugin boundary. Not a correctness bug — both already route through the canonical resolver — but a micro-instance of the platform's #1 anti-pattern: the same identity question wrapped separately per consumer instead of calling the one shared helper directly.
Open question
Since both are thin pass-throughs to ec_get_artists_for_user(), the simplest fix is to delete both wrappers and have the shop/api routes call ec_get_artists_for_user() directly (guarded by the existing function_exists check), rather than introduce a third shared wrapper. Confirm there are no callers relying on the wrapper name as an extension seam first.
Acceptance criteria
Found in the identity-core deep audit: extrachill-artist-platform#58 (§3, §5, [LOW]).
Summary
Two byte-for-byte-equivalent "get a user's artist IDs" wrappers exist in two plugins, both delegating to the canonical
ec_get_artists_for_user()with identical bodies:extrachill_api_shop_get_user_artist_ids( $user_id = null )—extrachill-api/inc/routes/shop/products.php:148extrachill_shop_get_user_artist_ids( $user_id = null )—extrachill-shop/inc/abilities/product-write-helpers.php:62Both do exactly:
Why it's debt
Pure duplication of a trivial pass-through across a plugin boundary. Not a correctness bug — both already route through the canonical resolver — but a micro-instance of the platform's #1 anti-pattern: the same identity question wrapped separately per consumer instead of calling the one shared helper directly.
Open question
Since both are thin pass-throughs to
ec_get_artists_for_user(), the simplest fix is to delete both wrappers and have the shop/api routes callec_get_artists_for_user()directly (guarded by the existingfunction_existscheck), rather than introduce a third shared wrapper. Confirm there are no callers relying on the wrapper name as an extension seam first.Acceptance criteria
ec_get_artists_for_user()directly (or one shared helper), not two per-plugin copiesFound in the identity-core deep audit: extrachill-artist-platform#58 (§3, §5, [LOW]).