• Resolved nikolab

    (@nikolab)


    Hi,

    I have a few questions regarding your plugin:
    Do you have any plugin hooks and/or actions that I can use so I can make changes?
    Specifically, I want to change the text for the upload image input and the text about the max size.

    If there are no action hooks, what is the way to edit the plugin file so they don’t overwrite my changes on the following update?
    I tried to copy the plugin folder and frontend.php, but that doesn’t work too.

    And finally, your plugin is adding dynamically div.wcpr-overall-rating-and-rating-count to comment section inside single-product-reviews.php
    Now my problem is that I’m trying to wrap div.wcpr-overall-rating-and-rating-count and put it inside my custom markup, for example div.col-3, but when the page loads, it always put my markup below your content (div.wcpr-overall-rating-and-rating-count) and it’s not inside my div.col-3.
    How do I prevent that?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • kimvt1991

    (@kimvt1991)

    Hi,

    There are some hooks but not for the upload image input and the text about the max size.

    To change the text for upload image input, please read this https://stackoverflow.com/questions/1163667/how-to-rename-html-browse-button-of-an-input-type-file the second answer should work.

    To wrap div.wcpr-overall-rating-and-rating-count in your div.col-3, please modify file plugins/woo-photo-reviews/js/script.js and replace this line:
    $('#' + comments).prepend($('.wcpr-filter-container')).prepend($('.wcpr-overall-rating-and-rating-count')).prepend($('.woocommerce-Reviews-title').eq(0));

    with this:

    $('#' + comments).prepend($('.wcpr-filter-container'));
    $('#' + comments).prepend('<div id="your-unique-custom-markup-id" class="col-3"></div>').prepend($('.woocommerce-Reviews-title').eq(0));
    $('#your-unique-custom-markup-id').prepend($('.wcpr-overall-rating-and-rating-count'));

    Best regards

    Thread Starter nikolab

    (@nikolab)

    Hi,

    Thank you for the provided solutions. But is there is a way to modify plugin files without being overwritten on the next update?

    In this case, if I change the code in the plugins/woo-photo-reviews/js/script.js my changes will be deleted when I update the plugin next time, and I don’t want to do that every time.
    The same is for the plugins/woo-photo-reviews/frontend/frontend.php file.

    Thanks.

    Best Regards

    kimvt1991

    (@kimvt1991)

    At the moment, i think that’s the only solution for you.
    I will add a filter for the text about the max size in next update.

    I can not find a way to modify our plugin files without being overwritten on the next update yet.

    Best regards

    Thread Starter nikolab

    (@nikolab)

    Ok, thanks for your help once again.
    I’ll monitor closely for the next update.

    Best Regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘edit plugin files’ is closed to new replies.