This file contains 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
<?php | |
// Modify WC Add to Cart - Send to Page Instead | |
add_filter( 'woocommerce_loop_add_to_cart_link', 'ds_change_addtocart_destination', 100 ); | |
function ds_change_addtocart_destination( $link ) { | |
global $product; | |
$product_id = $product->id; | |
$product_sku = $product->get_sku(); | |
$link = '<a href="'.get_permalink().'" rel="nofollow" data-product_id="'.$product_id.'" data-product_sku="'.$product_sku.'" data-quantity="1" class="button add_to_cart_button product_type_variable">More Information</a>'; | |
return $link; |
This file contains 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
/** | |
* Load gateways and hook in functions. | |
*/ | |
public function init() { | |
$load_gateways = array( | |
'WC_Gateway_BACS', | |
'WC_Gateway_Cheque', | |
'WC_Gateway_COD', | |
'WC_Gateway_Paypal', | |
); |
This file contains 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
function ds_per_state_fees() { | |
global $woocommerce; | |
$packages = $woocommerce->shipping->packages; | |
$state_fees = array( | |
'AK' => array( // Alaska Fee in Dollars | |
'amount' => 20, | |
'is_taxable' => false, | |
'name' => __( 'Handling Fee', 'woo-statefee' ), | |
), // End of fee | |
'HI' => array( // Hawaii Fee in Dollars |
This file contains 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
function custom_add_google_analytics() { ?> | |
<script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
ga('create', 'UA-XXXXXXXX-XX', 'auto'); | |
ga('send', 'pageview'); | |
This file contains 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 Tracking Code to the Thank You Page | |
*/ | |
function 161007_checkout_analytics( $order_id ) { | |
$order = new WC_Order( $order_id ); | |
$currency = $order->get_order_currency(); | |
$total = $order->get_total(); | |
$date = $order->order_date; | |
?> | |
<!-- Paste Tracking Code Under Here --> |
This file contains 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
<?php // Don't include this line | |
// Remove "Storefront Designed by WooThemes" from Footer | |
add_action( 'init', 'custom_remove_footer_credit', 10 ); | |
function custom_remove_footer_credit () { | |
remove_action( 'storefront_footer', 'storefront_credit', 20 ); | |
add_action( 'storefront_footer', 'custom_storefront_credit', 20 ); | |
} | |
This file contains 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
<?php // Don't include this line if you're just adding to your functions.php file | |
function wps_login_error() { | |
remove_action('login_head', 'wp_shake_js', 12); | |
} | |
add_action('login_head', 'wps_login_error'); |
This file contains 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
<?php | |
if ( ! defined( 'ABSPATH' ) ) exit; | |
/** | |
* Featured Slider Template | |
* | |
* Here we setup all HTML pertaining to the featured slider. | |
* | |
* @package WooFramework | |
* @subpackage Template | |
*/ |