Skip to content

Instantly share code, notes, and snippets.

@alemarengo
alemarengo / functions.php
Last active August 29, 2015 14:18 — forked from jameskoster/functions.php
Woocommerce: trying to change priority, add a custom tab and hide description tab if void
add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' );
function woo_new_product_tab( $tabs ) {
global $post;
$tabs['description']['priority'] = 25;
$tabs['reviews']['priority'] = 55;
$tabs['test_tab'] = array(
'title' => __( 'test_tab', 'woocommerce' ),
'priority' => 50,
<?php
/**
* Plugin Name: WooCommerce - List Products by Tags
* Plugin URI: http://www.remicorson.com/list-woocommerce-products-by-tags/
* Description: List WooCommerce products by tags using a shortcode, ex: [woo_products_by_tags tags="shoes,socks"]
* Version: 1.0
* Author: Remi Corson
* Author URI: http://remicorson.com
* Requires at least: 3.5
* Tested up to: 3.5
<?php
add_filter( 'woocommerce_get_price_html', 'growdev_custom_price_message', 30, 2 );
/**
* Add string to
*
* @param $price HTML string
* @param $product WC_Product object
* @return string
*/