Hide Zero Value On Zero Cost Shipping Methods WooCommerce

In WooCommerce if you use Local Pickup or other methods of shipping that don’t have a preset or calculated cost, the shipping labels on both the cart and checkout to appear with $0.00 price, like this: Local pickup: $0.00

Shipping label with 0 prices

This was an intentional change by WooCommerce. You can read the conversation and reasoning behind it here: github or add_rate() main function.

A couple of our customers preferred the old way, where free shipping methods didn’t show a $0.00 price:
Shipping methods didn't show $0.00 price
For hiding the zero value price on zero-cost shipping methods, use this filter in your functions.php file or custom functions plugin:

 * Hide zero value on any zero cost shipping methods
add_filter( 'woocommerce_cart_shipping_method_full_label', function( $label, $method ) {
    if ( $method->cost < 1 ) {
        $label = $method->get_label();
    return $label;
}, 10, 2 );

Remove shipping 0 price

Upload multiple files, insert into database, send email with multiple attachments

WordPress Custom code to upload files and save data into the database after successful upload send all files as attachments in an email to user.

Do you want professional help? We’ll repair it for you! Get assist Contact here!


    $uploaddir = '/home/public_html/wp-content/uploads/order-doc-folder/';
    foreach($_FILES['docat'] as $key => $doc){
      if($_FILES['docat']['name'][$key] != ''){
            $temp = explode(".", $_FILES['docat']['name'][$key]);
            $newfilename = $_REQUEST['order_id'].'-'.round(microtime(true)) . '-'.$temp[0].'.' . end($temp);
            $uploadfile = $uploaddir . basename($newfilename);
            if( move_uploaded_file($_FILES['docat']['tmp_name'][$key], $uploadfile)){
                $filename[] = $newfilename;
                $filenamed[] = $uploadfile;
$wpdb->query('update submit_order set status="'.$_POST['status'].'" where id = '.$_REQUEST['order_id']);
$wpdb->query("insert into order_status_history set status='".$_POST['status']."', comment='".$_POST['comment']."', filelist = '".serialize($filename)."', product_id = ".$_REQUEST['order_id']);
    $subject = 'Your Order status update';
    $message = '
Dear Customer,
Your order no: '.$result->u_id.' current status is '.$_POST['status'].'
';         $senderName = "Talk For WEB";     $senderEmail = "info@talkforweb.com.au";       $from = $senderName." <".$senderEmail.">";     $headers = "From: $from";       // Boundary       $semi_rand = md5(time());       $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";         // Headers for attachment       $headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\"";         // Multipart boundary       $message = "--{$mime_boundary}\n" . "Content-Type: text/html; charset=\"UTF-8\"\n" .     "Content-Transfer-Encoding: 7bit\n\n" . $message . "\n\n";         // Preparing attachment     if(!empty($filenamed)){         for($i=0;$iemail, $subject, $message, $headers, $returnpath);       $updateo = true;     // Return true, if email sent, otherwise return false     if($mail){         return true;     }else{         return false;     } 

Upload multiple files, insert into database, send email with multiple attachments