Adding tooltip to Woocommerce shipping options - woocommerce

Just to check if there's a way to add in tooltips or popovers for my shipping options to explain to the customers in more details what is this option about when they hover or tap on it(via mobile)?

Easy solution is to use a modal popup on click by adding the following to your functions.php file (see screenshots below). Link will be placed below the shipping options.
Refer to here for basic popup code: https://www.w3schools.com/howto/howto_js_popup.asp
Alternatively, use the Boxzilla plugin (free) with the code below.
add_action( 'woocommerce_checkout_order_review', function() {
echo '<p style="text-align: center; text-decoration: underline;"><a href="#boxzilla-15213">Shipping Estimates</p>';
});
Example of link location
Example of popup

Related

Customise my wordpress site to have the add to cart button appear when someone hovers over the products. I have attached the scree

I have very beginner level understanding of wordpress, woocommerce and elementor. I am still learning a lot of things. I believe that the best way to learn is to imitate. So, I go through various themes and try to imitate their behaviour and appearance using Elementor. But, this particular theme caught my eye. The Add to cart button appears when someone hovers over the product image instead of always being there. Can you guys please help me figure this out or atleast point me in the right direction?
This is how it should look when someone hovers over the images
This is how it looks when the mouse pointer is away
More info
<?php if($available) {?>
Buy now
<?php } ?>
This code solves my problem as expected.
WooCommerce documentation reference
Solution: Add code in your theme's function.php file.
add_action( 'woocommerce_single_product_summary', 'my_extra_button_on_product_page', 30 );
function my_extra_button_on_product_page() {
global $product;
echo 'Add to cart';
}
Solution: Install Custom WooCommerce Add to Cart plugin
Custom WooCommerce Add to Cart Plugin
Solution: You can use hooks with shortcodes:
custom add to cart button
Or create overrides for WooCommerce files in your own template

Unable to remove unwanted toggle button on custom plugin details page

I am having an issue with Gift Certificate Creator Plugin. After adding the shortcode [gift_certificate_form] on any post/page, we need to submit the form from the front end.
The details are also displayed in WordPress admin area.So when I checked from Gift certificate > settings. I am getting an unwanted toggle button near to username. I tried adding CSS, to hide but failed. So anyone please help me to find a solution for this.
You CSS doesn't work for admin dashboard if you written those in themes style.css.
You Need to write an add_action to functions.php.
And After I checked. I saw .toggle-row is the unwanted toggle button near to username Gift Certificate Creator. So Use Below Code in themes functions.php.
<?php
add_action('admin_head', 'my_css');
function my_css() {
echo '<style>
.toggle-row {
display: none;
}
</style>';
}
?>

Change "View Cart" and "Checkout" buttons text in Cart Widget Woocommerce

I'm trying to find the correct function or filter to edit the text of the buttons "View Cart" and "Checkout" in the Cart Widget of Woocommerce.
My website url : http://modularwave.com/ (just so you know i'm using Brutal, great theme from zigzagpress).
Thanks in advance for you help,
F.
You can use str_ireplace() to change the text of the button, the following function will allow you to change the text of a Woocommerce button:
//The filters.. both are required.
add_filter('gettext', 'change_checkout_btn');
add_filter('ngettext', 'change_checkout_btn');
//function
function change_checkout_btn($checkout_btn){
$checkout_btn= str_ireplace('Checkout', 'Your New Text', $checkout_btn);
return $checkout_btn;
}
To easily translate plugins use this plugin:
https://wordpress.org/plugins/loco-translate/
It lets you select a plugin.
Note, only plugins with .mo/.po files can be translated.
I hope this will help you!
Good luck.

Remove "Open link in a new window/tab" checkbox in Post link visual editor

I'm building a Wordpress site for a group of authors and have set it up to universally display internal links in the same tab while displaying external links in a new tab.
Unfortunately, the "Open link in a new window/tab" checkbox that appears in the link pop-up in the visual editor is causing them to freak out.
Does anyone know where this pop-up window is located and the best way I can filter this to remove that line and checkbox altogether?
You can add this function to your functions.php file. It will add a style to the admin area that hides the "link target" div:
function hide_link_target() {
echo '<style>
.link-target {display:none;}
</style>';
}
add_action('admin_head', 'hide_link_target');

Customizing the 'read more' link in Wordpress

Im trying to work on this site and I need to change the link in the "read more" button to another page (See picture, red circle).
How do I customize the destination of the "read more" link? This isn't an excerpt function, it is a clickable link that leads to a whole other page.
This will add a link in a div after the excerpt. Hide the initial read more link and that should work. Although the read more link really was intended only to link to the full article.
function add_excerpt_link($more) {
global $post;
return 'Custom Link;';
}
add_filter('excerpt_more', 'add_excerpt_link');

Resources