Skip to content

Instantly share code, notes, and snippets.

View themepaint's full-sized avatar

Shariful Islam themepaint

View GitHub Profile
@themepaint
themepaint / Register Custom Taxonomy Woocommerce Products
Created April 22, 2016 11:59
Register Custom Taxonomy Woocommerce Products
// Register Custom Taxonomy
function ess_custom_taxonomy_Item() {
$labels = array(
'name' => 'Brands',
'singular_name' => 'Brand',
'menu_name' => 'Brands',
'all_items' => 'All Brands',
'parent_item' => 'Parent Brand',
'parent_item_colon' => 'Parent Brand:',
@themepaint
themepaint / Woocommerce product type detection and cart text change
Created October 7, 2016 20:27
Woocommerce product type detection and cart text change
add_filter( 'woocommerce_product_single_add_to_cart_text', 'custom_single_add_to_cart_text' );
function custom_single_add_to_cart_text() {
global $product;
if( $product->is_type( 'variable' ) ){
return __( 'HD Download', 'woocommerce' );
}else{
@themepaint
themepaint / Woocommerce cart text change
Created January 28, 2018 04:16
Woocommerce cart change by putting the code in functions.php
//archive page or main page
add_filter( 'woocommerce_product_add_to_cart_text', 'woo_custom_product_add_to_cart_text_themepaint' ); // 2.1 +
function woo_custom_product_add_to_cart_text_themepaint() {
return __( 'Buy it on ebay', 'woocommerce' );
}