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
/** | |
* @Title: WooCommerce Hide or Remove SKU from Product Page | |
* @Author: Mina Pansuriya | |
* @Website: http://minapansuriya.com | |
*/ | |
add_filter( 'wc_product_sku_enabled', 'pbs_woo_hide_sku_on_product_page' ); | |
function pbs_woo_hide_sku_on_product_page( $sku_visibility ) { | |
if ( is_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
/** | |
* @Title: WooCommerce Remove SKU from the website completely. | |
* @Author: Mina Pansuriya | |
* @Website: http://minapansuriya.com | |
*/ | |
add_filter( 'wc_product_sku_enabled', '__return_false' ); | |
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
/** | |
* @Title: WooCommerce Add Custom Notes to Order Email | |
* @Author: Mina Pansuriya | |
* @Website: http://minapansuriya.com | |
*/ | |
add_action( 'woocommerce_email_after_order_table', 'pbs_woo_add_custom_message_to_admin_new_order', 15, 2 ); | |
function pbs_woo_add_custom_message_to_admin_new_order( $order, $is_admin_email ) { | |
if ( $is_admin_email ) { |
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
/** | |
* @Title: WooCommerce Edit Checkout Billing Address fields | |
* @Author: Mina Pansuriya | |
* @Website: http://minapansuriya.com | |
*/ | |
add_filter( 'woocommerce_checkout_fields' , 'pbs_woo_customize_checkout_billing_address_fields' ); | |
function pbs_woo_customize_checkout_billing_address_fields( $fields ) { | |
// Remove Billing Company Field |
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
/** | |
* @Title: WooCommerce Charge additional amount if Cart Quantity exceed given amount | |
* @Author: Mina Pansuriya | |
* @Website: http://minapansuriya.com | |
*/ | |
add_action( 'woocommerce_cart_calculate_fees', 'pbs_woo_charge_additional_fees_for_x_no_of_products' ); | |
function pbs_woo_charge_additional_fees_for_x_no_of_products(){ | |
global $woocommerce; |
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
/** | |
* @Title: WooCommerce Change Default Placeholder image for Product page | |
* @Author: Mina Pansuriya | |
* @Website: http://minapansuriya.com | |
*/ | |
add_action( 'init', 'ccw_custom_woo_placeholder' ); | |
function ccw_custom_woo_placeholder(){ | |
add_filter('woocommerce_placeholder_img_src','pbs_woo_product_placeholder_img_src'); | |
function pbs_woo_product_placeholder_img_src($src){ | |
// Here replace your image attachment ID with 2966 |
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
/** | |
* @Title: WooCommerce Display Coupon on Checkout page only | |
* @Author: Mina Pansuriya | |
* @Website: http://minapansuriya.com | |
*/ | |
function pbs_woo_hide_coupon_on_cart_page( $enabled ) { | |
if ( is_cart() ) { | |
$enabled = false; | |
} | |
return $enabled; |
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
/** | |
* @Title: WooCommerce Hide/Disable Coupons | |
* @Author: Mina Pansuriya | |
* @Website: http://minapansuriya.com | |
*/ | |
add_filter( 'woocommerce_coupons_enabled', 'pbs_woo_disable_coupon' ); | |
function pbs_woo_disable_coupon( $coupons_enabled ) { | |
return false; | |
} |
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
/** | |
* @Title: WooCommerce Change "Continue Shopping” Link on the Cart Page | |
* @Author: Mina Pansuriya | |
* @Website: http://minapansuriya.com | |
*/ | |
add_filter( 'woocommerce_continue_shopping_redirect', 'pbs_change_cart_continue_shopping_link' ); | |
function pbs_change_cart_continue_shopping_link() { | |
return 'http://www.exmple.com/page-name'; | |
} |
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
/** | |
* @Title:WooCommerce Change "Continue Shopping" Message on Cart Page | |
* @Author: Mina Pansuriya | |
* @Website: http://minapansuriya.com | |
*/ | |
add_filter( 'wc_add_to_cart_message', 'pbs_change_cart_message', 10, 2 ); | |
function pbs_change_cart_message( $cart_message, $product_id ) { | |
if(strpos($cart_message, "Continue Shopping") !== false) |