WordPress.org

Support

Support » Plugins and Hacks » [Resolved] add checkout link?

[Resolved] add checkout link?

Viewing 1 replies (of 1 total)
  • Plugin Author Ewout

    @pomegranate

    Hi Giellemme,
    You can change the link to the cart page to the checkout page by using filters (available from version 2.2.0 of the plugin).

    Add the following to your functions.php:

    add_filter('wpmenucart_fullurl', 'wpmenucart_to_checkout', 1, 1);
    function wpmenucart_to_checkout ($url) {
    	global $woocommerce;
    	$url = $woocommerce->cart->get_checkout_url();
    	return $url;
    }
    
    add_filter('wpmenucart_fulltitle', 'wpmenucart_to_checkout_title', 1, 1);
    function wpmenucart_to_checkout_title ($title) {
    	$title = 'Go to checkout'; //hover text for menu
    	return $title;
    }

    Our plugin can be used in a multi-language setup using WPML + String Translation.
    In such a case you would probably need to be able to add the Menu Cart to several different menus (one for each language). By default the Pro version enables for 3 menus, and by using extra filters we can add infinitely more in relatively simple way (update proof).

    If you are using just one language on the front end (for example Italian) and want to use English on the backend, you can use a little trick:
    duplicate the corresponding .mo & .po files (it_IT) and rename them to en_US or en_GB (depending on which is used for the base install).

    Let us know if you have any other questions!

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] add checkout link?’ is closed to new replies.