Title: Unnecessary frontend JavaScript / jQuery dependency
Last modified: September 22, 2026

---

# Unnecessary frontend JavaScript / jQuery dependency

 *  [Vania](https://wordpress.org/support/users/twvania/)
 * (@twvania)
 * [2 weeks ago](https://wordpress.org/support/topic/unnecessary-frontend-javascript-jquery-dependency/)
 * Hi,
   I noticed that the plugin enqueues `apd-public.js` with `jquery` as a dependency:
 *     ```wp-block-code
       wp_enqueue_script(
           'apd-public',
           APD_PLUGIN_URL . 'public/js/apd-public.js',
           array( 'jquery' ),
           APD_VERSION,
           true
       );
       ```
   
 * This seems unnecessary because the functionality implemented in `apd-public.js`
   is **already implemented in the plugin’s CSS**.
 * The CSS already handles the checked state:
 *     ```wp-block-code
       .apd-deposit-option input:checked + .apd-option-content .apd-option-radio {
           border-color: #6366f1;
       }
       ```
   
 * So the plugin is currently loading an **additional JavaScript file**, **jQuery**,
   and consequently **jQuery Migrate**, just to implement functionality that is 
   already covered by CSS.
 * This is especially problematic for modern WordPress sites using FSE/block themes,
   where jQuery is generally not used on the frontend. Adding jQuery solely for 
   this small visual interaction unnecessarily increases the frontend dependencies.
 * Is there a reason for keeping `apd-public.js` and the jQuery dependency here?
   From what I can see, this JavaScript can be removed without losing any functionality.
 * Thanks for looking into this!

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Md. Abdullah Al Mahim](https://wordpress.org/support/users/aamahin/)
 * (@aamahin)
 * [1 week, 6 days ago](https://wordpress.org/support/topic/unnecessary-frontend-javascript-jquery-dependency/#post-19028066)
 * Hello [@twvania](https://wordpress.org/support/users/twvania/)
 * We are working on it to fix the issue, In the next version release it will be
   solved.Thanks for reporting the issue,
 * Best Regards

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funnecessary-frontend-javascript-jquery-dependency%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/advanced-partial-payment-or-deposit-for-woocommerce/assets/
   icon-128x128.gif?rev=2636813)
 * [Advanced Partial Payment or Deposit for WooCommerce](https://wordpress.org/plugins/advanced-partial-payment-or-deposit-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-partial-payment-or-deposit-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-partial-payment-or-deposit-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-partial-payment-or-deposit-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-partial-payment-or-deposit-for-woocommerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Md. Abdullah Al Mahim](https://wordpress.org/support/users/aamahin/)
 * Last activity: [1 week, 6 days ago](https://wordpress.org/support/topic/unnecessary-frontend-javascript-jquery-dependency/#post-19028066)
 * Status: not resolved