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 | |
/* | |
* Plugin Name: WooCommerce Example Plugin | |
* Requires Plugins: woocommerce | |
* Plugin URI: http://speakinginbytes.com | |
* Description: Our custom WooCommerce functionality | |
* Version: 2.0 | |
* Author: Patrick Rauland | |
* Author URI: http://speakinginbytes.com | |
* License: GPL2 |
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 | |
/* | |
Plugin Name: WooCommerce Make Sale Prices Accessible | |
Plugin URI: https://gist.github.com/BFTrick/47b0710a6d27332d0c109cfe75c58be6 | |
Description: Make WooCommerce sale prices accessible | |
Version: 1.0 | |
Author: Patrick Rauland | |
Author URI: http://speakinginbytes.com | |
License: GPL2 | |
License URI: https://www.gnu.org/licenses/gpl-2.0.html |
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 | |
/* | |
Plugin Name: WooCommerce Move Product Page Price Lower | |
Plugin URI: https://gist.github.com/BFTrick/e19bd2bb648558ca78279c3d5ba9524e | |
Description: A demo plugin to move the WooCommerce sinmple product price lower | |
Version: 1.0 | |
Author: Patrick Rauland | |
Author URI: http://speakinginbytes.com | |
License: GPL2 | |
License URI: https://www.gnu.org/licenses/gpl-2.0.html |
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
.home .products .product .price { | |
opacity: 0; | |
} | |
.home .products .product:hover .price { | |
-webkit-animation: fade-in-bottom 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) both; | |
animation: fade-in-bottom 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) both; | |
} | |
/* ---------------------------------------------- |
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 | |
/* | |
Plugin Name: Pixel Perfect Webinar Changes | |
Description: The changes for the Pixel Perfect Webinar | |
Version: 1.0.0 | |
Author: Patrick Rauland | |
Author URI: https://speakinginbytes.com | |
*/ | |
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 | |
/* | |
* Plugin Name: Heap Analytics | |
* Plugin URI: https://gist.github.com/BFTrick/bb3b3b0e0497e8adecfa00e3c8e1b33d | |
* Description: Send all site data to Heap Analytics | |
* Author: Patrick Rauland | |
* Author URI: http://speakinginbytes.com | |
* Version: 1.0 | |
*/ |
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 | |
// change the number of products per row | |
add_filter( 'loop_shop_columns', 'patricks_loop_columns', 20 ); | |
function patricks_loop_columns() { | |
return 5; // the number of products per row | |
} | |
// you still need to add CSS to make it look right. In Storefront you can add this to your style.css file. | |
// @media (min-width:768px){ | |
// .products .product { |
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 | |
// Display 25 products per page. Goes in your theme's functions.php | |
// Credit: https://gist.github.com/jameskoster/1601682 | |
add_filter( 'loop_shop_per_page', 'patricks_products_per_page', 20 ); | |
function patricks_products_per_page( $num_products ) { | |
return 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 | |
// credit: ChromeOrange - https://gist.github.com/ChromeOrange/10013862 | |
add_filter( 'woocommerce_package_rates' , 'patricks_sort_woocommerce_available_shipping_methods', 10, 2 ); | |
function patricks_sort_woocommerce_available_shipping_methods( $rates, $package ) { | |
// if there are no rates don't do anything | |
if ( ! $rates ) { | |
return; | |
} | |
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 | |
add_filter( 'woocommerce_add_to_cart_redirect', 'patricks_custom_cart_redirect' ); | |
function patricks_custom_cart_redirect() { | |
// our prodcut category ID | |
$product_cat_id = 10; // replace this number with your category ID | |
// redirect to the page | |
return get_term_link( $product_cat_id, 'product_cat' ); | |
} |
NewerOlder