As a role of thumb, you should not extend widgets that you do not control unless their author specifically gave guidance on how to do that. Extending is somewhat easier on the PHP side, but it is hard(er) to extend UI with JS if facilities were not put in place in advance.
A safer (at least from ease of development perspective) way is to “fork” the widget code. Take the code, make whatever modification you need to it, and call the widget a new name, or depending on your needs you can override the “official” name (unregister the original, and register yours under the same handle).
This will mean that with each new version of WC you will need to make sure that you do not need to update your code to reflect a change in the “original” widget, but most likely you would have needed to do that even if you were just “extending”.
Related Posts:
- Update widget form after drag-and-drop (WP save bug)
- How do register_sidebar() and get_sidebar() work together?
- Widgets vs. Theme Mods
- Widgets not working in Customizr but working in Appearance
- Get the sidebar ID in which the current widget was dropped
- How Can A Widget With Only One Instance Be Defined?
- How to exclude certain widget from showing up on home/front page? [duplicate]
- Customise search form in the Widget
- Schedule cron event from widget
- How to Register and Display Widget for Custom taxonomy
- register_sidebar ‘after_widget’ on custom-built widgets not implementing, caused nested widgets
- Add ‘Right Now’ widget to custom dashboard
- Count widgets of a certain type
- Widget Javascript code (ajax)
- Custom widget select options needs to stay selected after save
- Custom Widget form function common elements
- Updating Widget options in custom install.php
- Modify a theme to insert custom widgets?
- How did I enable atom feeds in a fresh WP3 install?
- Child Theme – how to add new widget on a specific place?
- Warning: Creating default object… when altering Customize panels
- Adding custom field in all widgets, but at the top of the form, in admin area
- How do I change the markup only of a built-in widget?
- Is it possible to make widget return only data (eg, array)?
- Allow a Widget to be used one time only?
- Search widget will search everything in the site, how to limit to only search gallery name
- Disable widgets in customizer for sidebar
- Unable to edit the “customize” section and the “widget” section is populating unknown code
- Choose sidebars column in widgets.php page [closed]
- Can’t receive $args[ ] to my custom widget
- Organizing the position of widgetized areas in the backend
- how to convert Html block to dynamic widget?
- I’d like to move the Widgets Panel to the bottom of the list in Customizer
- Create small dashboard widget
- Widgets won’t save
- Customizing the Widget content markup
- Widget title markup in register_sidebar
- Sticky menu for WP custom menubars
- How to append custom text to the output of ‘categories widget’?
- Customise the Category Widget
- What’s the right way to share data between widgets?
- Customize Widget Navigation
- Add custom border across footer widget area
- Customize section does not show my widget areas
- Widget recent comment filter by post meta_value
- How could I change contact details in the footer?
- Make Widget appear on Dashboard
- How to narrow the area between buttons on Helium theme sidebar? [closed]
- How to hide or remove a custom widget area when empty
- Execute function with jQuery if widget added or removed?
- Still desperate about multiple TinyMCEs in widgets – is there any good solution to this yet?
- Custom Admin Section
- How to define active widget with js in a customizer
- Confused about customising widgets
- Special characters showing in fallback font
- customize footer widgets area
- How do I include the sidebar (with Widgets) in a custom theme?
- Is it possible to change the attributes of a registered style or script before it fires?
- how to change “published date” format on edit.php (Posts page)?
- How to change submit button value in comment from “Post Comment” to “Send”
- How to update widget from widget() function?
- Creating a searchable A-Z listing of hundreds of companies/services
- Customize in category page
- How to get WordPress to accept the tag in articles (or other alternatives)
- How do I change the default admin color scheme in MP6
- Calling a php file from a javascript file in wordpress
- Custom URL going to 404
- TinyMCE custom dialog with selectbox not working
- Load more posts with multiple queries
- How to wrap the list with custom class using wp_nav_menu?
- Custom search to display results within same page
- Get ORIGINAL image links from get_post_gallery
- change url for static files in /wp-admin with a cdn url
- Sub menu indicator that links to sub menu
- How can I have a common background color across multiple WordPress blocks?
- Get Custom Taxonomy Terms by Date
- Removing blank space below header [closed]
- Custom Search on Custom Page while preserving the main search function
- Point homepage to custom php page
- How can I tag a menu item as visited for each unique user?
- Many Rewrite Parameters/Rules
- How to Render Post Types in RSS Feed?
- 404 when Previewing an unsaved draft
- Custom Taxonomy Sort For a Custom Query
- Display a specified content on a Page and all its child pages
- kitchen sink not working
- Is it possible to auto sharing post on social network from specifc categories or tags
- WordPress category custom title
- How to display strikethrough text in button text (for special offer)
- Remove Title and White Space in Twenty Twenty theme
- Add a custom intro page
- How to have differents sites share the same tables of DB?
- How to add particular attribute of product in shop as well as home page
- How to change custom link of subpages from of localhost to website
- Custom login doesn’t stay
- Custom dropdown search form that allows users to select option B based from Option 1
- Smarter Document Management links between three WordPress sites sought
- Create a google friendly header with text and logo
- Disallow “contributors” to edit their own posts once they’ve been set to “Pending Review”
- Add custom styles to the Raft theme