• Hello,

    I am a WP developer. I’m trying to convert my current projects to your new React Components. But, I am facing 3 problems:

    1. How can I run/trigger React with the dynamic content? My projects use ajax to load products in some places.
    2. With php template, I can easy to add more CSS class and html. Example, I can add html of tooltip to button. How can I do that with React?
    3. With php template, I can remove your default icon html via filters and use my custom icon (add custom CSS). How can I do that with React?

    Looking forward to hearing from you!

    Thank you very much!

    • This topic was modified 4 months, 4 weeks ago by Stormit.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Juan Coronel

    (@juaancmendez)

    Hello there,
    thanks for contacting us!

    I will contact the developer and as soon as I have any news I will post it here.

    Best regards.

    Plugin Support Juan Coronel

    (@juaancmendez)

    Hello there,
    thanks for your patience.

    1. There is a JS WP Hook action?“yith_wcwl_init_add_to_wishlist_components”?that when triggered looks for all the elements that have this class?“yith-add-to-wishlist-button-block”?(more precisely that match this selector:?.yith-add-to-wishlist-button-block:not(.yith-add-to-wishlist-button-block–initialized)?) and try to build a react component inside of it. It’s necessary that the element with this specific class has some information in it, the most important one is?data-product-id, that will contain the product id linked to the Add To Wishlist button, and can have also a?data-attributes?that specifies some other button’s features.
      If the button container with the specific class is printed at the page loading it should be rendered without the use of the JS WP Hook doAction.
    2. With react is not possible to override the content easily, we should implement a specific structure made on purpose to allow it, and at the moment is not planned to be done.
    3. It depends on how you were doing it in the previous version, you can still use CSS to both remove and add the new icon (using a display:none; to hide the current one and implement your own like you were doing in the previous version using the correct class names).

    I hope I have been helpful.

    Have a nice day!

    Thread Starter Stormit

    (@stormit)

    Hi @juaancmendez,

    Thank you for your reply!

    In my opinion, replacing PHP template to React is not a good update. I don’t yet see the performance optimization. But, it is really difficult to customize, not flexibility. I recommend that:

    • Your team should improve it and make it to be easy to customize.
    • You should keep both PHP template and React. With the large sites, user can enable React to optimize speed. But, with most of sites, the React feature is not necessary.

    I’m a WordPress theme developer. I developed the WooCommerce themes and sell them on themeforest and got over 22k sales. If you replace PHP template to React, I will consider leaving your plugin because I can not customize it as I want.

    Your plugin has many downloads because it is included in the themes. If many authors leave your plugin, it will not be popular anymore. Please consider about this!

    Have a nice day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.