thanks… I dont know if is this good way, but this code in the child theme functions.php is working for me:
add_filter('woocommerce_product_class', 'myFunction', 10, 4);
function myFunction($classname, $product_type, $post_type, $product_id) {
$classname="SUB_WC_Product_my";
return $classname;
}
class SUB_WC_Product_my extends SUB_WC_Product {
public function get_product_price( $context="view" ) {
return "AB";
}
}
Related Posts:
- WooCommerce create new product and add to cart on form submit
- Over write plugin templates
- How to get subscription key or id using Woocommerce Subscriptions [closed]
- Dropdown menu on custom page with product to choose number of products per page
- Change wordpress current_time function to different timezone
- How to enable specific plugin only based around shop manager role?
- Replacing a plugin function with a custom renamed function doesn’t work
- Redirect to another page using contact form 7? [closed]
- wc_get_template new template does not showing up
- WordPress Stock Update Programatically
- Woocommerce singe product custom gallery output works just on the first slide
- Getting a ressource ID, from a WC_Order_Item_Product/Order
- How to get custom minimum price in Woocommerce
- How to make WooCommerce payment method field optional?
- Create category for each user
- add a hook of Woocommerce to a plugin but it only shows and doesn’t function properly
- ACF Fields are not showing up on Homepage
- Adding discount functionality to the cart
- How to assign a specific service to a specific provider based on location
- Make modification of add_to_cart button specific to single page
- Easiest way to load/fire a handful of functions, IF checkbox is checked?
- Securing langugae folder
- Configuring default woo commerce login with modal popup
- Move related products after product summary? [closed]
- is_plugin_active() not defined on active plugin, in the thumbnails.php file
- Woocommerce – Product Description heading [closed]
- Woocommerce disable checkout on specific day
- Adding a script & php to functions.php
- Product customizing quiz – quiz adding products to the cart
- Show WooCommerce products based on query parameters on redirect
- Best collection of code for your 'functions.php' file [closed]
- How to include a plugin’s php file to another plugin functions file [duplicate]
- if plugin is active? check if plugin is enabled or not?
- How to override a theme function (within a class) using a plugin
- Seeking clarification on page request life-cycle
- How to assign user a role if none is present when logging in
- Add Products to user’s ID Woocommerce
- How to remove action from plugin?
- How to find out what blocks are added by a plugin
- Invalid shipping method, WooCommerce [closed]
- How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
- Need Old Version of plugins
- plugin development: problem with functions
- How to append to title via functions.php for auto-posting plugin [duplicate]
- Custom random quote widget breaks when used in multiple sidebars
- Woocommerce Deposit, then random payments until product paid in full [closed]
- custom payment gateway in woocommerce failed to connect to remote api server
- How to call WordPress function other files
- Conditional attributes and logic per product category
- How to create an option page for this simple plugin
- the_tags : can we insert a class
- PHP Error When a plugin is active
- PHP script from functions php is loaded via admin-ajax to div…and the result is 0, not the desired content
- Adding class to last list item? Not WP generated
- I changed .live() to .on() but change is not reflected on the server
- wp_enqueue_scripts
- Woocommerce Coupon Menu and Marketing Menu missing After “Coupons can now be managed from Marketing > Coupons.” [closed]
- How can I fetch data from another website to my wordpress website with mysql database
- How can I concatenate variables to search results title? [closed]
- woocommerce search by sku and title ajax
- Sending customer an email with link to stripe to make payment
- how to change wp-admin url using function file
- Changing plugin options from theme functions file?
- Could not add ‘LoginLogout’ link using BAW login logout plugin
- My widget won’t update its values when save is clicked
- Replace the_content with ACF Flexible Content via function
- Translations not appended even strings are edited
- How to get brand children with woocommerce brands
- Make downloadable ebook read online without download option
- Is there any way to sync Facebook Comments and with comments on WordPress website?
- Sharing varible between two add_actions
- Woocommerce convert simple products to variations
- WooCommerce Product Table – filter query on attributes
- Disable WC Bookings automatic order completion [closed]
- Display Woocommerce attribute name above product title
- In woocommerce, is there any way to empty wordpress default mini cart when order placed?
- In woocommerce, is it possible to make payment of one customer order by another customer?
- Woocommerce budget search
- Override filter variable not working
- Tracking sales/conversions in Woocommerce using Google Analytics
- Allow vendors on a WordPress site to pick from a gallery of pre-selected images when choosing product’s featured image
- Change pricing in Woocommerce based on Category and Product [closed]
- Get a Taxonomy values in an array
- Place content inside the Post Loop
- How to replace native comment_count with Comments Evolved aggregate count
- Hook into install email
- wordpress Shortocode running twice?
- Woocommerce: deleted single-product.php, everything still works. How is it possible?
- Is there any wordpress function to update a random post every 10 minutes?
- Calling an custom field from theme option at the frontend
- pluggable function in theme, to be overridden by plugin
- Showing author box on post detail page
- add query string to all pages after user logged in
- Simple WordPress function / plugin to redirect a site
- Remove base from the custom post type URL [duplicate]
- Send Processing Order Email from custom payment plugin
- Shortcode inside a redirect [closed]
- How often should I execute add_filter and function declaration in Code Snippets?
- how to add meta for order in woocommerce
- Event Made Easy – Block registration to two or more events that have the same category