
Similar Posts
WordPress shortcode/cart count/ current page URL/check user login
Below function has WordPress shortcode/cart count/ current page URL/checking user is logged-in or logged-out cartlogin function will return the cart and different message for logged-in and logged-out user. function cartlogin_func( $atts ) { global $current_user; get_currentuserinfo(); $div .= ‘<a href=”/cart/” target=”_self” rel=”noopener noreferrer” aria-label=”link to /wishlist/”><i class=”fas fa-cart-plus” aria-hidden=”true”><b>’.WC()->cart->get_cart_contents_count() .'</b></i></a>’; if ($current_user->ID == ”) {…

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 This was an intentional change by WooCommerce. You can read the conversation and reasoning behind it…

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! if(isset($_POST[‘status’])){ $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]);…

Woocommerce Filter
Remove product link on checkout page Using add filter woocommerce_cart_item_name we can modify woocommerce product name with condition check for checkout page. //remove product link on checkout page add_filter(‘woocommerce_cart_item_name’, ‘custom_filter_wc_cart_item_remove_link’, 10, 3); function custom_filter_wc_cart_item_remove_link($product_name, $cart_item, $cart_item_key) { if (is_checkout()) { $wccart = new WC_Cart(); $name = apply_filters(‘woocommerce_cart_item_remove_link’, sprintf( ‘ ‘, esc_url($wccart->get_remove_url($cart_item_key)), __(‘Remove this item’, ‘woocommerce’),…

Adding Custom Field in Export Products Dropdown Woocommerce
When we need to add custom field in dropdown list of Woocommerce product export filter. We can add below Filter Hook. By defualt when we select ‘Export all columns’ Woocommerce will export all values. function add_export_data( $product, $name ) { $pid = $product->get_id(); if($product->get_type() == ‘variation’){ $pid = $product->get_parent_id(); } $sale_code = get_post_meta( $pid, $name,…

WordPress Development, Design and Customization Company
Boost your business with WordPress, one of the most popular Content Management Systems in use on the web today. We offer WordPress development and design , hosting and installation, speed optimisation, custom plugin development and support. We can also help you migrate from other CMS systems such as Joomla and Drupal over to WordPress. We…