Skip to content

Instantly share code, notes, and snippets.

@thadallender
Last active August 29, 2015 13:58
Show Gist options
  • Save thadallender/9984230 to your computer and use it in GitHub Desktop.
Save thadallender/9984230 to your computer and use it in GitHub Desktop.
To customize the "continue shopping" text on the Sell Media checkout page, paste this code into your active theme's functions.php or create your own plugin with your tweaks containing this code.
<?php
/**
* Plugin Name: Sell Media Continue Shopping Filter
* Plugin URI: https://graphpaperpress.com/plugins/sell-media/
* Description: Filter to Sell Media "Continue shopping" links
* Version: 1.0.0
* Author: Thad Allender
* Author URI: https://graphpaperpress.com
* Author Email: support@graphpaperpress.com
* Text Domain: sell_media
* Domain Path: languages
* License: GPL2
*/
/**
* Change the http://example.com link below
* to your custom continue shopping link.
*/
define( 'CONTINUE_SHOPPING_LINK', 'http://example.com' );
/**
* Change the empty cart message
*/
function my_sell_media_empty_continue_shopping(){
echo 'Your shopping cart is empty. <a href="' . CONTINUE_SHOPPING_LINK . '">Continue shopping</a>';
}
add_filter( 'sell_media_continue_shopping', 'my_sell_media_empty_continue_shopping' );
/**
* Change the continue shopping link if cart has products
*/
function my_sell_media_continue_shopping(){
echo 'or <a href="' . CONTINUE_SHOPPING_LINK . '">continue shopping &raquo;</a>';
}
add_filter( 'sell_media_or_continue_shopping', 'my_sell_media_continue_shopping' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment