This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Change styles applied to one page | |
* | |
* Uses 'wp' to run after WP class object so page content is available | |
*/ | |
function sv_hide_header_footer_for_page() { | |
if( is_page( 2576 ) ) { | |
?> <style> | |
header#header, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Each of these samples can be used - note that you should pick one rather than add them all. | |
* | |
* How to use WC notices: https://github.com/woothemes/woocommerce/blob/master/includes/wc-notice-functions.php#L96 | |
* Tutorial: http://www.skyverge.com/blog/edit-woocommerce-templates/ | |
**/ | |
/** | |
* Add a content block after all notices, such as the login and coupon notices. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Let's make the product box images in WPSPSC lightbox previews instead | |
* | |
* The plugin is here: https://wordpress.org/plugins/wordpress-simple-paypal-shopping-cart | |
* Using this lightbox plugin: https://wordpress.org/plugins/responsive-lightbox/ | |
*/ | |
function make_wpspsc_thumbs_lightbox_previews( $thumbnail, $atts ) { | |
// Code Credit: http://stackoverflow.com/questions/19323324/how-to-get-image-src-attribute-value-from-php-string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Snippets to hide EDD coupon fields & codes during the checkout process - handy if you use URLs to apply discounts instead | |
* Tutorial: http://www.sellwithwp.com/easy-digital-downloads-hide-coupons/ | |
*/ | |
// Removes the field to enter a discount at checkout | |
remove_action( 'edd_checkout_form_top', 'edd_discount_field', -1 ); | |
// Changes the discount code in the checkout summary to display "Discount applied - " instead of the code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Orders> | |
<Order> | |
<OrderId>892</OrderId> | |
<OrderNumber>#892</OrderNumber> | |
<OrderDate>2014-10-20 13:19:41</OrderDate> | |
<OrderStatus>completed</OrderStatus> | |
<BillingFirstName>Hank</BillingFirstName> | |
<BillingLastName>Schrader</BillingLastName> | |
<BillingFullName>Hank Schrader</BillingFullName> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tutorial: http://www.skyverge.com/blog/change-woocommerce-return-to-shop-button/ | |
function skyverge_change_empty_cart_button_url() { | |
return get_site_url(); | |
//Can use any page instead, like return '/sample-page/'; | |
} | |
add_filter( 'woocommerce_return_to_shop_redirect', 'skyverge_change_empty_cart_button_url' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Adds content below featured images | |
* Tutorial: http://www.skyverge.com/blog/add-content-woocommerce-featured-images/ | |
**/ | |
function skyverge_add_below_featured_image() { | |
echo '<h4 style="text-align:center;margin-top:10px;">Click to Enlarge</h4>'; | |
} | |
add_action( 'woocommerce_product_thumbnails' , 'skyverge_add_below_featured_image', 9 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Echos the SKU for the product when used on a single product page | |
* Can optionally pass in the ID to echo the SKU for a product elsewhere | |
* Use [wc_sku] or [wc_sku id="ID"] | |
* Tutorial: http://www.skyverge.com/blog/output-woocommerce-sku/ | |
**/ | |
function skyverge_get_product_sku( $atts ) { | |
global $product; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Echos a link that uses the SKU as part of the link | |
* Use [wc_sku_link] | |
* Tutorial: http://www.skyverge.com/blog/output-woocommerce-sku/ | |
**/ | |
function skyverge_generate_sku_link() { | |
global $product; | |
$sku = $product->get_sku(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add a "Click to View" link that includes the product SKU (if available) after the short description | |
* Tutorial: http://www.skyverge.com/blog/output-woocommerce-sku/ | |
**/ | |
function skyverge_add_sku_link_to_excerpt( $output ) { | |
global $product; | |
$sku = $product->get_sku(); | |
if ( ! empty( $sku ) ) { |