Home Forums WoodMart support forum Child Theme overwrite inc/inc/integrations/woocommerce/modules/wishlist/class-u

Child Theme overwrite inc/inc/integrations/woocommerce/modules/wishlist/class-u

Viewing 24 posts - 1 through 24 (of 24 total)
  • Author
    Posts
  • #274389

    cazac.victor
    Participant

    Hi!
    How can i overwrite the file
    /wp-content/themes/woodmart/inc/integrations/woocommerce/modules/wishlist/class-ui.php
    in child theme.
    Thank you.

    #274521

    Hello,

    Unfortunately, these files cannot be rewritten in the child theme.

    If you have any questions please feel free to contact us.

    Best Regards

    #274666

    cazac.victor
    Participant

    Is it possible to add the ability to change wishlist button positions in the theme settings in the future?

    #274774

    Hello,

    Please provide the details how you want to change the wishlist?

    Best Regards

    #275106

    cazac.victor
    Participant

    /wp-content/themes/woodmart/inc/integrations/woocommerce/modules/wishlist/class-ui.php

    Line 101
    
    	add_action( 'woocommerce_after_add_to_cart_button', array( $this, 'add_to_wishlist_single_btn' ), 33 );
    
    Line 296			
    	<a href="<?php echo esc_url( woodmart_get_whishlist_page_url() ); ?>" data-key="<?php echo esc_attr( wp_create_nonce( 'woodmart-wishlist-add' ) ); ?>" data-product-id="<?php echo esc_attr( get_the_ID() ); ?>" data-added-text="<?php esc_html_e( 'Browse Wishlist', 'woodmart' ); ?>"></a>
    #275192

    Hello,

    You have provided the code however you have not described the purpose, do you want to remove the button or rename it?

    Best Regards

    #275226

    cazac.victor
    Participant

    I wont to move button after “Add to cart” button and remove text beside wishlist button.

    #275361

    Hello,

    Please add this code to the functions.php of the child theme:

    remove_action( 'woocommerce_single_product_summary', 'woodmart_after_add_to_cart_area', 31 );
    add_action( 'woocommerce_single_product_summary', 'woodmart_after_add_to_cart_area', 34 );

    Add this code to the Theme Settings > Custom CSS:

    .single-product-page .wd-wishlist-btn.wd-action-btn.wd-style-text>a:before {
    	font-size: 14px;
    }
    .single-product-page .wd-wishlist-btn.wd-action-btn.wd-style-text>a {
    	font-size: 0px;
    }

    Best Regards

    #282707

    cazac.victor
    Participant

    Is it possible to add a choice of location of the Wishlist button to the theme settings?

    #282955

    Hello,

    What do you mean, please?

    Could you provide more details?

    Best Regards

    #283532

    cazac.victor
    Participant

    To change Wishlist button position:

    from

    add_action( 'woocommerce_single_product_summary', array( $this, 'add_to_wishlist_single_btn' ), 33 );

    for exmple to

    add_action( 'woocommerce_after_add_to_cart_button', array( $this, 'add_to_wishlist_single_btn' ), 33 );

    #283652

    Hello,

    Please try to replace “woodmart” into “wd” in all the custom code provided above.

    Best Regards

    #285132

    cazac.victor
    Participant

    I asked about setting the button output. Not about styles.

    #286855

    cazac.victor
    Participant

    Is there a chance to add the location of the Wishlist button to the theme settings?
    Now I have to edit the template file after every theme update.

    #287320

    Hello,

    Sorry for the late reply, we have had issues on the forum and did not see your message.

    Where do you want to place the button?

    You can add an icon and text and link them to the Wishlist page, hide the Wishlist on the product page.

    Best Regards

    #287340

    cazac.victor
    Participant

    I want to place button after Add to cart button.

    To change Wishlist button position:

    from

    woocommerce_single_product_summary

    to

    woocommerce_after_add_to_cart_button

    #287499

    Hello,

    Please try this code, add it to the functions.php of the child theme:

    remove_action( 'woocommerce_single_product_summary', array( XTS\WC_Wishlist\UI::get_instance(), 'add_to_wishlist_single_btn' ), 33 );
    add_action( 'woocommerce_after_add_to_cart_button', array( XTS\WC_Wishlist\UI::get_instance(), 'add_to_wishlist_single_btn' ), 33 );

    Best Regards

    #287578

    cazac.victor
    Participant

    I get the error:

    Fatal error: Uncaught Error: Class 'XTS\WC_Wishlist\UI' not found

    Attachments:
    You must be logged in to view attached files.
    #287846

    Hello,

    Please provide FTP access to the private area.

    Best Regards

    #287951

    cazac.victor
    Participant

    Ok.

    #287998

    cazac.victor
    Participant

    To see the website use

    #288225

    Hello,

    Please replace the code we provided earlier with this one:

    add_action('wp', function(){
    	remove_action( 'woocommerce_single_product_summary', array( XTS\WC_Wishlist\UI::get_instance(), 'add_to_wishlist_single_btn' ), 33 );
    	add_action( 'woocommerce_after_add_to_cart_button', array( XTS\WC_Wishlist\UI::get_instance(), 'add_to_wishlist_single_btn' ), 33 );
    });

    Best Regards

    #288323

    cazac.victor
    Participant

    Thank You! It’s working.

    #288485

    You are welcome! If you have any questions please feel free to contact us.

    Best Regards

Viewing 24 posts - 1 through 24 (of 24 total)

The topic ‘Child Theme overwrite inc/inc/integrations/woocommerce/modules/wishlist/class-u’ is closed to new replies.