When calling parent::__construct()
from WC_Widget_Product_Departments
the constructor of WC_Widget_Product_Categories
immediately overwrites the class properties (especially the widget_id
), see here at GitHub. So you have to extend WC_Widget
to create a new widget and then you can copy anything what you need in your widget from WC_Widget_Product_Categories
to WC_Widget_Product_Departments
.
Related Posts:
- Use wc_enqueue_js only on specific pages – nested add_action
- OOP Plugin Development. Including external object
- woocommerce subscriptions – get expiration date [closed]
- Automated Cart Update With Alert Box Each Time
- WooCommerce/WordPress: how hide entire table form after submit (Admin Dashboard)?
- How to auto fetch customer details in Woocommerce in checkout page
- I want to add custom add to cart link [closed]
- Undefined method class::construct() when creating a plugin
- Usage of call back function of add_meta_box()
- Change product_base programmatically
- Can a plugin redirect product page based on IF condition?
- Cant register rest routs from class instance
- WordPress WP_Query without query GET parameters
- Where to copy woocommerce files to in my custom theme to avoid editing the core plugin?
- custom post type with role Vendor
- Woocommerce custom Plugin in wordpress [closed]
- Add a custom WooCommerce settings tab with sections
- Payment field disappears on custom Paypal plugin
- Call to “admin_notices” hook from a static method
- I am having errors with checkout on wordpress
- product_type_options get saved value [closed]
- Use PHP Class in WordPress functions
- How can I update the price when someone enters postcode or zip code in woocommerce checkout page?
- Looping through and combining calls to Woocommerce REST API
- How to import woocommerce custom fields data into another site?
- How do I remove an action hook inside a class that is called by another class?
- PHP calling function within a class
- How to execute add_action() function from custom plugin to Crontrol plugin or do_action()?
- Issues separating my Plugin pages into different files
- How keep woocommerce users separeted in multisite install and keep admins on network
- Custom field fetch error on woocommerce pdf invoice
- Woocommerce Convert existing order to the cart
- add_action in namespace not working
- When to use Exceptions vs Error Objects vs just plain false/null
- Woocommerce get selected shipping zone id for the current user
- simple wordpress ajax plugin not working when not logged in
- How to show order data by multiple ID?
- how to create and show sessions in word press?
- Problem with Woocommerce REST API Authentication
- How to get all existing post types
- How to add SVG icon above product tab title
- How to change / delete product short description in Woocommerce
- How to trash multiple post/product programmatically
- Query String being Removed Creating a Pagination Issue within a Custom Plugin
- OrderItem get_total() returns lower value than $order_item->get_product()->get_price() * quantity
- wp_insert_post() is returning the correct post ID, no failure, but the post content does not get updated
- Setting up 2 SMTP accounts: 1 for wordpress and 1 for woocommerce
- WooCommerce – Reset quantity input field when variation changes
- Custom Text in WooCommerce Order Processing Email Based on Products
- Trying to get property of non-object “ wordpress ”
- How to set up VS Code for WP plugin/theme development in 2021? [closed]
- Saving an array of dynamic repeater data as post_meta
- How can I apply_filters from inside a function?
- Improve page speed loading using CDN and async or defer attribute
- Displaying Woocommerce Product Category in WordPress
- Add to cart function not working for first product when cart is empty [closed]
- Woocommerce : Can’t get product info in loop
- PHP > Scheduled Tasks > Sending daily email with dynamic API variables
- “Undefined index” error when saving empty array with checkboxes
- get_total () returns 0 – woocommerce [closed]
- Building a REST API for your web app exposes primary keys of DB records?
- How to rename woocommerce-billing-fields
- Check class_exists before class definition / Doxygen problem
- Create a package of products as one Item in woocommerce?
- Action Hook Inside WordPress Plugin Shortcode
- After disabling WPML multi currency, the currency is still handled by the WPML
- Submit form to db
- How can i programmatically change the SKU of a product based on product variation?
- Execute PHP code only with specific user role
- WordPress Fresh Install Errors (Woocommerce specifically now)
- PHP function for horizontal Woocommerce thumbnails and badges
- WooCommerce display price before add to cart [closed]
- Get the same SKU from woocommerce itself for simple and variable products
- code that I can run, or a plug in to show what sql tables something pulls information from
- Automatic email message after manual user approval
- can I extend the WP_Query class to deal with ‘duplicate’ posts created by joining to wp_posts?
- Woocommerce checkout page – custom field checkbox value into email
- Display attached images of a page or post that are insetred using gallery
- overwrite wordpress gallery with custom gallery shortcode
- Enqueue sripts and styles only if function is called
- Add widget area from visual editor
- Register/enqueue scripts only on certain admin pages
- Looping through custom data in a custom table to display all items in a post
- Make WooCommerce product categories only show images on homepage
- WooCommerce Quantity in Dropdown menu instead of clasic [closed]
- WooCommerce subcategories help
- Woocommerce list variations that are added already to cart in Single Product
- WooCommerce multiple custom fields code
- Custom Plugin Develoment, Form Action
- WordPress Query Crashes Browser
- wp_query beginner
- How to Request a User to Register on Landing at a Site, Then Automatically Delete the Users Password on Logout?
- Plugin Modification Change Functionality For Logged User Only
- WordPress using get_term to retreive slug not working as expected
- INCOMING: Wall of code for form and $_POST, not updating custom field’s value
- WooCommerce – Print Processing orders [closed]
- add shortcode heading showing multiple time
- using a shortcode in a hyperlink
- Login user into magento using wordpress account
- Customize create table SQL statement in any WordPress plugin