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
- This topic has 23 replies, 2 voices, and was last updated 3 years, 10 months ago by
Elise Noromit.
-
AuthorPosts
-
March 17, 2021 at 5:00 pm #274389
cazac.victorParticipantHi!
How can i overwrite the file
/wp-content/themes/woodmart/inc/integrations/woocommerce/modules/wishlist/class-ui.php
in child theme.
Thank you.March 18, 2021 at 8:29 am #274521
Elise NoromitMemberHello,
Unfortunately, these files cannot be rewritten in the child theme.
If you have any questions please feel free to contact us.
Best Regards
March 18, 2021 at 7:19 pm #274666
cazac.victorParticipantIs it possible to add the ability to change wishlist button positions in the theme settings in the future?
March 19, 2021 at 8:13 am #274774
Elise NoromitMemberHello,
Please provide the details how you want to change the wishlist?
Best Regards
March 20, 2021 at 3:55 pm #275106
cazac.victorParticipant/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>
March 21, 2021 at 11:33 am #275192
Elise NoromitMemberHello,
You have provided the code however you have not described the purpose, do you want to remove the button or rename it?
Best Regards
March 21, 2021 at 1:37 pm #275226
cazac.victorParticipantI wont to move button after “Add to cart” button and remove text beside wishlist button.
March 22, 2021 at 9:01 am #275361
Elise NoromitMemberHello,
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
April 14, 2021 at 9:17 am #282707
cazac.victorParticipantIs it possible to add a choice of location of the Wishlist button to the theme settings?
April 14, 2021 at 6:52 pm #282955
Elise NoromitMemberHello,
What do you mean, please?
Could you provide more details?
Best Regards
April 16, 2021 at 9:55 am #283532
cazac.victorParticipantTo 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 );
April 16, 2021 at 6:04 pm #283652
Elise NoromitMemberHello,
Please try to replace “woodmart” into “wd” in all the custom code provided above.
Best Regards
April 21, 2021 at 2:41 pm #285132
cazac.victorParticipantI asked about setting the button output. Not about styles.
April 26, 2021 at 4:44 pm #286855
cazac.victorParticipantIs 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.April 27, 2021 at 5:52 pm #287320
Elise NoromitMemberHello,
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
April 27, 2021 at 6:46 pm #287340
cazac.victorParticipantI 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
April 28, 2021 at 8:07 am #287499
Elise NoromitMemberHello,
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
April 28, 2021 at 10:59 am #287578
cazac.victorParticipantI get the error:
Fatal error: Uncaught Error: Class 'XTS\WC_Wishlist\UI' not found
Attachments:
You must be logged in to view attached files.April 29, 2021 at 7:49 am #287846
Elise NoromitMemberHello,
Please provide FTP access to the private area.
Best Regards
April 29, 2021 at 10:46 am #287951
cazac.victorParticipantOk.
April 29, 2021 at 12:43 pm #287998
cazac.victorParticipantTo see the website use
April 30, 2021 at 7:45 am #288225
Elise NoromitMemberHello,
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
April 30, 2021 at 11:50 am #288323
cazac.victorParticipantThank You! It’s working.
April 30, 2021 at 10:10 pm #288485
Elise NoromitMemberYou are welcome! If you have any questions please feel free to contact us.
Best Regards
-
AuthorPosts
The topic ‘Child Theme overwrite inc/inc/integrations/woocommerce/modules/wishlist/class-u’ is closed to new replies.
- You must be logged in to create new topics. Login / Register