• Custom Functions

    Add Shipping Notice on Checkout Page : Woocommerce

    Add text above Order Notes in the Shipping column of the checkout page. Below is the example to add it on your functions.php or to your plugin snippet. add_action( 'woocommerce_after_order_notes', 'sectionplus_notice_shipping' ); function sectionplus_notice_shipping() { echo ‘ Please allow 3-5 business days for delivery after order processing. ‘; }

  • Custom Functions

    Remove Woocommerce Product Tabs Heading

    add_filter('woocommerce_product_description_heading', '__return_empty_string');   Css Code for horizontal tab : .product .woocommerce-tabs ul.tabs { width: 100%; float: none; margin-right: 5.8823529412%; } .woocommerce div.product .woocommerce-tabs ul.tabs { list-style: none; padding: 0; /*padding: 0 0 0 1em;*/ margin: 0 0 1.618em; overflow: hidden; position: relative; } .woocommerce div.product .woocommerce-tabs ul.tabs::before { position: absolute; content: ‘ ‘; width: 100%; bottom: 0; left: 0; /*border-bottom: 1px solid #d3ced2;*/ z-index: 1; } .woocommerce div.product .woocommerce-tabs ul.tabs li { border: 1px solid #d3ced2; border-radius: 4px 4px 0 0; /*background-color: #ebe9eb;*/ display: inline-block; position: relative; z-index: 0; /*margin: 0 -5px;*/ padding: 0 1em; } .woocommerce div.product .woocommerce-tabs ul.tabs li.active { /*background: #fff;*/ z-index: 2; border-bottom-color: #777; background-color: #ebe9eb;…

  • Custom Functions

    Add Product categories on invoices under product name

    add_action( 'wpo_wcpdf_after_item_meta', 'wpo_wcpdf_show_product_categories', 10, 3 ); function wpo_wcpdf_show_product_categories ( $template_type, $item, $order ) { // get a comma separated list of categories (category links stripped) if (isset($item['product'])) { if (function_exists('wc_get_product_category_list')) { // WC3.0+ $category_list = wc_get_product_category_list( $item['product']->get_id() ); } else { $category_list = $item['product']->get_categories(); } echo ' Categories: '.strip_tags( $category_list ).' '; } } if categories does not show… replace the $item[‘product’]->get_id() to $item[‘product_id’].

  • Custom Functions

    PDF Invoice Number and Order Number

    Invoice number to be the same as Order number , here is the code for this one. /** * Format order number with invoice number settings */ add_filter( 'wpo_wcpdf_raw_document_number', 'wpo_wcpdf_raw_document_number', 10, 4 ); function wpo_wcpdf_raw_document_number( $number, $settings, $document, $order ) { if ( $document->get_type() == 'invoice' ) { $number = $order->get_order_number(); } return $number; }

  • Custom Functions

    Adding strike through on product subtotal after coupon code

    Here is the short custom function if you want to add a strike though on prices after coupon code. function jp_discount( $price, $type, $amount ){ switch( $type ){ case 'percent_product': $newprice = $price * ( 1 - $amount/100 ); break; case 'fixed_product': $newprice = round($price - $amount,2); break; case 'percent_cart': $newprice = $price * ( 1 - $amount/100 ); break; case 'fixed_cart': $newprice = $price - $amount; break; default: $newprice = $price; } return round($newprice,2); } function jp_woocommerce_cart_item_subtotal( $subtotal, $cart_item, $cart_item_key ){ $coupons = WC()->cart->get_coupons(); foreach ( $coupons as $code => $coupon ) : $newsubtotal = wc_price( jp_discount( $cart_item['line_total'], $coupon->discount_type, $coupon->amount ) ); $categories = array(35); if( has_term( $categories, 'product_cat',…