Changing the Button Text ‘Go to Shop’ #
1. Access your website’s files.
2. Navigate to your theme’s function.php file.
3. Add the following code snippet at the end of the file:
add_filter(
'wlfmc_no_product_in_wishlist_button',
function() {
return '<a href="' . esc_url( home_url() ) . '" class="wc-forward button empty-button">' . esc_html__( 'Custom Text', 'woocommerce' ) . '</a>';
}
);
4. Replace the Custom Text with your desired button text.
5. Save the changes.
Changing the Image #
1. Access your website’s files.
2. Navigate to your theme’s function.php file.
3. Add the following code snippet at the end of the file:
add_filter(
'wlfmc_no_product_in_wishlist_image',
function() {
return '<img src="' . esc_url( get_stylesheet_directory_uri() ) . '/your-custom-image.png" alt="Custom Image">';
}
);
4. Replace the your-custom-image.png with the name of your custom image file.
5. Save the changes.