• Mark

    (@cybertech537)


    Hi YITH team,

    I have enabled the feature where I converted the YITH Wishlist PHP template to React for the front end, but it is not appearing in the Elementor editor.

    Additionally, I need a custom button for styling purposes. The “Add to Wishlist” button should include my own loader, heart icon, and tooltip.

    I created a custom button, but I am unable to add or remove products from the wishlist via AJAX. Could you please assist me with this?

    ajax handler code
    ————————-

    if ( class_exists( 'YITH_WCWL_Wishlist_Factory' ) ) {
    $product_id = intval( $_POST['product_id'] );
    $wishlist = YITH_WCWL_Wishlist_Factory::get_wishlist();


    if ( $wishlist->has_product( $product_id ) ) {
    // Remove from Wishlist
    $wishlist->remove_item( $product_id );
    wp_send_json_success( array( 'action' => 'removed' ) );
    } else {
    // Add to Wishlist
    $wishlist->add_item( $product_id );
    wp_send_json_success( array( 'action' => 'added' ) );
    }
    }
Viewing 1 replies (of 1 total)
  • Plugin Support Juan Coronel

    (@juaancmendez)

    Hello there,
    thanks for contacting us!

    You say the list of widgets for our plugin isn’t showing up in Elementor?

    On the other hand, unfortunately, we can’t help with that type of customization.

    We will be attentive to your response.

    Best regards.

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