How to edit and keep class-wc-widget-featured-products.php update proof (3 posts)

  1. krisscross90
    Posted 2 years ago #

    Within the class-wc-widget-featured-products.php file I need to Remove this on Line 101:
    <?php if ( $r->post->post_title ) echo get_the_title( $r->post->ID ); else echo $r->post->ID; ?>

    and Remove:
    </a> <?php echo $product->get_price_html(); ?>

    And change the UL tag to a DIV and delete the li tags, which is fine to do within the core file... but can anyone tell me how I would implement this in the functions file to keep my changes from being deleted with every woocommerce update?

    I tried adding the edited file to a woocommerce>classes>widgets file structure but I've just read that this only works with template files.

    Any help will be great appreciated!!


  2. setnaps
    Posted 2 years ago #

    Hi Krisscross90.
    Did you happen to find a solution for your request?
    I also want to edit tje class-wc-widget-featured-products.php

  3. krisscross90
    Posted 2 years ago #

    Hi Setnaps. No i didn't find a solution unfortunately. I've just saved my changes to a txt file on my computer and everytime I update, I just copy over my code. Bit of a hassle though! Hope you find some answers! :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic