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_filter( 'woo_breadcrumbs_trail', 'woo_custom_filter_breadcrumbs_trail', 10 ); | |
function woo_custom_filter_breadcrumbs_trail ( $trail ) { | |
foreach ( $trail as $k => $v ) { | |
if ( strtolower( strip_tags( $v ) ) == 'products' ) { | |
$trail[$k] = 'Photos'; | |
break; | |
} | |
} | |
return $trail; | |
} // End woo_custom_filter_breadcrumbs_trail() |
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 custom tracking code to the thank-you page | |
*/ | |
add_action( 'woocommerce_thankyou', 'my_custom_tracking' ); | |
function my_custom_tracking( $order_id ) { | |
// Lets grab the order | |
$order = wc_get_order( $order_id ); |
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
<?php | |
/** | |
* Plugin Name: Custom Fields for WooCommerce | |
* Description: Add custom fields to WooCommerce products | |
* Version: 1.0.0 | |
* Author: Gareth Harris | |
* Author URI: https://catapultthemes.com/ | |
* Text Domain: cfwc | |
* WC requires at least: 3.4.0 | |
* WC tested up to: 3.4.2 |
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
<?php | |
/** | |
* Plugin Name: Pharmacy | |
* Plugin URI: http://domain.com | |
* Description: Add extra info for pharmacy products | |
* Author: Your name | |
* Author URI: http:// domain.com | |
* Version: 1.0 | |
*/ |
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
/** | |
* Will add information to the shop loop above the "Add to cart" button | |
* This example will use post meta (custom fields) and display them if set | |
* Tutorial: http://www.skyverge.com/blog/add-information-to-woocommerce-shop-page/ | |
**/ | |
function skyverge_shop_display_post_meta() { | |
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
/** | |
* Will add information to the shop loop above the "Add to cart" button | |
* This example will use post meta (custom fields) and display them if set | |
* Tutorial: http://www.skyverge.com/blog/add-information-to-woocommerce-shop-page/ | |
**/ | |
function skyverge_shop_display_post_meta() { | |
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
/** | |
* Will add information to the shop loop above the "Add to cart" button | |
* This example will use post meta (custom fields) and display them if set | |
* Tutorial: http://www.skyverge.com/blog/add-information-to-woocommerce-shop-page/ | |
**/ | |
function skyverge_shop_display_post_meta() { | |
global $product; | |