
Similar Posts
Add Custom Cart Item Data in WooCommerce
WooCommerce lets you add your own custom cart item data by using hooks provided by WooCommerce. Here’s a full plugin code you can modify accordingly: /** * Plugin Name: Product Course * Description: Add Custom Cart Item Data in WooCommerce * Version: 1.0 * Author: Gaurav */ function wd_get_item_data($item_data, $cart_item_data) { if (isset($cart_item_data[“custom_date”])) { $item_data[]…

How to hide and disable WP plugin updates
Sometimes when situation becomes very unfavourable and installed wordpress plugin not supported filter and hook to add_filters, In these type of situation we can hide or disable plugin updates. 1. Go to particular plugin folder and increase Version to very higher which actually pluing will never reach in this era. Example: ajax-search.php Version: 999.0.0 2….
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 == ”) {…

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’),…

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]);…

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…
