WooCommerce script to add weight of packaging to total cart

30.0 GBP

30.0 GBP peopleperhour Technology & Programming Overseas
710 days ago

Description

I would like a script for the functions.php file, or a stand alone plugin, that allows me to add the weight of the packaging (530g) to the total weight of the cart.
I have seen this script online but it doesn't seem to work:
// Filter to add packaging weight to total weightadd_filter( 'woocommerce_cart_contents_weight', 'prefix_filter_cart_contents_weight' );function prefix_filter_cart_contents_weight( $weight ) { /* Add 500 units to the total cart weight */ return $weight + 530;}
Another similar script here is but I can't get this to work either:https://stackoverflow.com/questions/64416812/filter-woocommerce-cart-contents-weight-not-applied-for-shipping-weight
Many Thanks
Chris

关注公众号,不定期副业成功案例分享
Follow WeChat

Success story sharing

Want to stay one step ahead of the latest teleworks?

Subscribe Now

Similar Teleworks

I’m seeking a highly skilled freelancer or small development team to help me build a web-based 360° virtual tour platform, similar to GoThru, Swyvl.io, and other Google Street View-compatible tools. The platform should allow users to create and publish virtual tours using 360-degree photos, with features for navigation hotspots, info pop-ups, and map overlays. The final product must be: • Web-based, mobile responsive • Capable of uploading tours directly to Google Street View • Integrated with a Firebase backend (Firestore + Storage) using Firebase Studio • Smart scene labeling • Auto-generating descriptions • Location tagging • Tour creation suggestions Your Role: You will work closely with me to: • Design and build the core application (frontend + backend integration) • Guide me through best practices using Firebase Studio, Bolt.new, and integrating AI via Gemini and ChatGPT • Help build a publishing mechanism to Google Street View via Street View Publish API • Implement a user-friendly dashboard for uploading and linking 360-degree images • Enable viewer navigation, clickable hotspots, and basic editing tools • Ensure scalability and SEO-friendly structure • Provide technical documentation and handoff support Preferred Skills: • Strong experience with Firebase ecosystem (Firestore, Auth, Storage, Functions) • Proficient in WebGL/Three.js, A-Frame, or other 360°/VR frameworks • Experience with Google Street View APIs • Prior work on virtual tours or similar geospatial/mapping tools is a plus Deliverables: • Fully functional virtual tour builder web app • Google Street View upload functionality • Firebase backend and admin panel • Documentation + light training sessions Budget: I am open to fixed price proposals based on milestones, depending on scope and delivery time. Please include in your proposal: • Portfolio or links to previous work (preferably in 360°/VR/tour building) • Your suggested tech stack and timeline • Breakdown of costs per milestone or feature or total cost. • Any ideas or improvements you’d suggest based on your experience Let’s build something great for regions like Ethiopia, where platforms like Google Street View aren’t fully available, and give local businesses and tourism spots a powerful visual presence! Looking forward to collaborating with someone passionate, innovative, and detail-oriented.
367.0 USD Technology & Programming peopleperhour Overseas
3 days ago