Can’t get woocommerce_get_price_html to work [closed]

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>’; }

In woocommerce cart item we can add custom text but how can i add custom link? [closed]

You can use below code for your requirement. it will add website/file url to cart page, checkout page and order summary in back-end. You need to create one custom field for website/file url in product page. https://prnt.sc/pa7fyg that url/link will be display at: in product detail page above add to cart button. https://prnt.sc/pa7h9s Cart page … Read more

Remove unwanted elements for a wp_nav_menu

I got it to work by reconfiguring the walker class custom_menu extends Walker_Nav_Menu { function start_el(&$output, $item, $depth, $args) { global $wp_query; $indent = ( $depth ) ? str_repeat( “\t”, $depth ) : ”; $class_names = $value=””; $classes = empty( $item->classes ) ? array() : (array) $item->classes; $class_names = join( ‘ ‘, apply_filters( ‘nav_menu_css_class’, array_filter( … Read more