I think your are missing parameters (even if you’re not using those) as per its definition and always try to return
into filters instead of echo
the value. Try the following:
add_filter( 'woocommerce_get_price_html', array( $this, 'get_price_html' ), 10, 2);
public function get_price_html( $price_html, $product )
{
return '<a href="https://wordpress.stackexchange.com/questions/344716/my-price">' . $product->get_price() . '</a>';
}
Related Posts:
- Woocommerce – Hide a Column in Cart Table
- Remove an action by extending class and replacing it
- WooCommerce change Tax Class programmatically when Recalculating an existing Order [closed]
- Override woocommerce loop-start.php from theme using plugin?
- WordPress Reset password Strength set to medium
- Using query_vars filter
- Is it possible to remove next-post / previous-post with out creating a custom template?
- How do I Make a Theme “plugin-ready”?
- How to iterate through custom posts and add the title to an array
- How to modify post content before writing to database?
- Actions or filters fired when data is saved in a custom table
- Display only certain posts based on visitor’s country?
- How to use filter hook ‘post_updated_messages’ in coherence with action hook ‘save_post’
- Conditional add_filter?
- product-attribute-slug-is-too-long-28-characters-max
- Is it possible to create an action hook using do_action() within add_action()?
- Calling apply_filters on non-documented hooks
- How to allow Unfiltered HTML in a wordpress multisite install
- Is there a way to verified if an add_filter is already applied?
- Add multiple shipping rates from add_rate function with custom ID
- set_sale_price in WooCommerce [closed]
- multiple functions with same filter
- How to get orders with used coupon in WooCommerce
- Order properties should not be accessed directly
- add_filter : Passing an array instead of the callback function?
- How to check if Woocommerce Order number equals to post ID?
- How plugins_loaded works?
- Namespaced action and filter tags
- Two functions utilizing registration_errors filter
- Is there a Filter that I can use to filter the tags before they are inserted in to the database?
- WordPress is automatically linking plain text email addresses
- WooCommerce Admin Reports : Get custom product report based on date range
- Woocommerce checkout update totals with datepicker
- Why doesn’t my simple the_title filter get applied?
- Strange issue saving custom field data for a WooCommerce order
- Woocommerce – Convert Delivery method into a custom field
- Prefixing plugin hooks (actions/filters) with a wrapper class or functions
- Show disclaimer with accept button before redirecting to the payment gateway website
- How do I apply a custom discount to individual product total prices depending on their categories on the cart and checkout pages of WooCommerce? [closed]
- In woocommerce cart item we can add custom text but how can i add custom link? [closed]
- Updating Woocommerce Settings API when WordPress Settings API saved and vise versa
- How to extend WooCommerce API to show bookable product availability rules?
- Search and Filter
- Customize WooCommerce my account dashboard through plugin
- Woocommerce Composite Products – Add a composite product to cart programmatically via ajax [closed]
- WordPress custom taxonomy check box to dropdown
- Woocommerce order empty items array
- How to get all product in the woo-commerce? [closed]
- Bind a function with its own argument to show something dynamically after every content
- Hook add_attachment error
- How to change WooCommerce loop product title HTML output in single product page and archive page
- Sending an SMS on new order placed – WooCommerce
- Update variable value via add_filter
- Can we use a library under MIT license in a WooCommerce plugin?
- Set _regular_price 0 if empty in woocommerce product
- How remove trashed WooCommerce orders from wc_get_orders() result?
- Gravity Forms Anchor only on Front Page?
- How to find list of all functions bind to a particular hook from my plugin?
- How do i remove the title from a specific page
- Can / should a widget plugin define its own Widget Area?
- Is there an action_filter hook to add content before the post title?
- Adding tables to dashboard pages programmatically?
- want to show CMB2 metabox on woocommerce product data tab
- Dynamic page generation upon purchase of a product
- Customise Grouped Product display in Woocommerce with custom column
- Make a php array load faster
- Create Woocommerce product without creating api credentials
- Woocommerce place order update shipping price
- add_filter postbox_classes multiple post types
- Add custom product data using javascript when add to cart button is clicked
- Override category archive page title (not the head title)
- Trying to run a Ajax request from a checkout form in woocommerce via a custom plugin
- Securing custom rest API endpoints with public access from PWA
- WooCommerce – Stop assigning order numbers
- Adding customs fields on each product on the cart
- How to direct WordPress to load custom template for custom post type
- Redirect WooCommerce checkout to cart
- Pre-populated WooCommerce checkout fields: dropdown fields issue
- Woocommerce Product finder feature on home page
- WordPress Plugin Boilerplate – add actions and/or filters based on user’s role
- Woocommerce product not appearing in category list page when created programatically [closed]
- How to trigger WooCommerce user profile edit change?
- Override theme’s WooCommerce file
- WC_Geolocation not found inside plugin
- Change Front page displays settings conditionally when user is online
- How to use functions from Woocommerce documentation?
- I have a plugin where in I have to change the title of the page dynamically by sending parameter to the_title filter
- how to retrieve post_id under woocommerce_add_to_cart_validation hook?
- Woocommerce Custom Checkout
- Hook for plugin to show content for certain urls
- Woo-commerce: Adding additional page sections using a child theme
- WP: adding Javascript to specific woo commerce pages
- WordPress permalink setting
- append code after the_content not working
- What is the meta_query key name for the woo product average rating? [closed]
- WooCommerce adds a newline symbol (\n) between email recipients
- Ninja Forms: Front-End Forms, Post ID?
- Allow HTML in product attributes and variation for WooCommerce
- How do I add multiple custom menu Woo-commerce my account page?
- I want to redirect user to an amazon product page from my wordpress website when they add product to there cart [closed]