MoreConvert Documentation

How to Customize the Empty List Image and Button Text?

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.

 

Removing/Hiding the ‘Go To Shop’ Button: #

Alternatively, if you prefer not to display the button at all, you can utilize an empty string in the code snippet provided above. This effectively removes or hides the button from your wishlist interface.

add_filter(
'wlfmc_no_product_in_wishlist_button',
function() {
// Returning an empty string will effectively remove the button
return '';
}
);

 

 

 

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.

 

 

What are your feelings?
Updated on February 21, 2024

How to Customize the Empty List Image and Button Text?

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.

 

Removing/Hiding the ‘Go To Shop’ Button: #

Alternatively, if you prefer not to display the button at all, you can utilize an empty string in the code snippet provided above. This effectively removes or hides the button from your wishlist interface.

add_filter(
'wlfmc_no_product_in_wishlist_button',
function() {
// Returning an empty string will effectively remove the button
return '';
}
);

 

 

 

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.

 

 

What are your feelings?
Updated on February 21, 2024