How to change position of ‘Add to Wishlist’ button in WooCommerce Wishlists
![](jpg/nine-kopfer-295988-unsplash-856x571.jpg)
If you’re using WooCommerce Wishlists, you might want to change the position of the ‘Add to Wishlist’ button in the single product template.
To do this, you just use the woocommerce_wishlists_template_location
filter:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function prefix_wishlist_template_location( $template_hook, $product_id ) { | |
// Return your hook here | |
return 'woocommerce_single_product_summary'; | |
} | |
add_filter( 'woocommerce_wishlists_template_location', 'prefix_wishlist_template_location', 10, 2 ); |
Just substitute whichever hook you want to call the button on.