Find Jobs
Hire Freelancers

WOOCOMMERCE what is wrong with this function

$10-30 USD

Completed
Posted about 4 years ago

$10-30 USD

Paid on delivery
there is a function is_bought which should return count when all conditions met: 1. order status must be completed, AND 2. product type must be job_package OR promotion_package (dont count single, grouped etc) AND 3. the price must be higher than 0 I need some to clean it up and make it work. function has_bought( $user_id = 0 ) { global $wpdb; $customer_id = $user_id == 0 ? get_current_user_id() : $user_id; $paid_order_statuses = array_map( 'esc_sql', wc_get_is_paid_statuses() ); $results = $wpdb->get_col("SELECT [login to view URL] FROM {$wpdb->prefix}posts AS P INNER JOIN {$wpdb->prefix}postmeta AS pm ON [login to view URL] = pm.post_id AND pm.meta_key = '_customer_user' AND pm.meta_value = $customer_id INNER JOIN {$wpdb->prefix}postmeta AS pm2 ON [login to view URL] = pm2.post_id AND pm2.meta_key = '_order_total' AND pm2.meta_value >0 LEFT JOIN {$wpdb->prefix}term_relationships AS TTR ON TTR.object_id = [login to view URL] LEFT JOIN {$wpdb->prefix}term_taxonomy AS TTM ON TTR.term_taxonomy_id = TTM.term_taxonomy_id AND [login to view URL] = 'product_type' LEFT JOIN {$wpdb->prefix}terms AS TT ON TTM.term_id = TT.term_id AND TT.slug='job_package' OR TT.slug='promotion_package' WHERE P.post_status IN ( 'wc-" . implode( "','wc-", $paid_order_statuses ) . "' ) AND P.post_type LIKE 'shop_order' GROUP BY [login to view URL]"); return count( $results ) > 0 ? true : false; }
Project ID: 23497033

About the project

12 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hello, I am a freelance WordPress developer with experience of 5 years. I have worked on WooCommerce for over 8-10 projects. I have also worked on fetching similar kind of data from WooCommerce. Please DM so that we can discuss this further. Thanks
$15 USD in 1 day
4.8 (28 reviews)
4.7
4.7
12 freelancers are bidding on average $22 USD for this job
User Avatar
Hello, I have delivered more than 350 projects to my clients successfully and continuing to deliver the best to my clients and helping them grow their business. My Strength is to meet the deadline and provide dedicated support to my clients and run their business 24/7 smoothly. I can start your project immediately once we are done with the discussion. CMS Solutions: ============ WordPress, Shopify, Opencart, dropshipping, Prestashop. eCommerce Solutions: ================= eCommerce, BigCommerce, WooCommerce. Web Designing: ============ Theme Design, Mockup Design, Logo Design, Banner Design, Newsletter Design, Flyer Design, PSD to HTML Slicing, Php, Laravel, Bootstrap . . . Hope to hear from you. Regards
$30 USD in 1 day
4.9 (133 reviews)
7.3
7.3
User Avatar
⭐⭐⭐⭐⭐I personally, reviewed your provided job details and got a fair idea about your project. I am enlightened to inform you that we have worked with many enterprises. We need to know a few things • What specific features do you want on the site? • What features do you want your website to have? • Describe the style of the website you want. 1) Wordpress website 2) Mobile friendly 3) SEO Optimized 4) We will do work as per our discussion based feature 5) Work with client to create a custom website interface - layout, colors, and fonts 6) Set up website architecture and navigation system 7) Integrate content management system 8) Create website mirror for beta testing purposes Looking forward to a positive response on your side. Thanks Relevant Skills and Experience⭐⭐⭐⭐⭐ - 14 years of experience in Wordpress development - 5 star rated freelancer with over 300 completed projects - Got Preferred Freelancer award. - Fast communication and deliver on time
$10 USD in 1 day
4.9 (328 reviews)
7.3
7.3
User Avatar
Hello, Hope you are doing great. I have read your project requirement & I understood it completely. we can develop this application as we have already worked on many application in past. I am having 3+years of experience in android application development. Also, expertise in Android Studio, Java, Web services API's, Back-end & graphic design. let's discuss your application and requirement. Best Regards Navneet Lytechx Digital Pvt. Ltd
$18 USD in 5 days
4.9 (112 reviews)
6.9
6.9
User Avatar
Hi, i will fix this function and make it return count ready to start now and finish it in next few hours. regards, Ameer
$30 USD in 1 day
4.9 (140 reviews)
6.3
6.3
User Avatar
Hey There After going through the details of your projects I understand that you need a developer to fix a issue . I believe that you are looking for a quality work which needs to be completed under a certain deadline. I want to inform you that we have worked on something similar for one of our client. But I still have few questions regarding the project that needs a clarification. Lets get connected to take this forward. Thanks Eminence Hub
$20 USD in 7 days
5.0 (58 reviews)
6.0
6.0
User Avatar
Hello! Thanks for sharing your project with me. I hope you feeling always good. I am interested in your project. I have a lot of experiences in this kind of application so that it is easy for me to work more than 6+ year experience... My range of Products and services include the following: • PHP/MYSQL/Manage Database/Laravel/CakePhp • HTML / CSS / JavaScript / jQuery • Payment Getways Integration • SEO & Etc. • Web design, Graphic design, and so on. I am a Photoshop master. If you hire me I will provide you perfect result and you will get satisfied within a short period. I got couple of questions to clear before we proceed further. I appreciate you to discuss this project in greater detail. Would you kindly chat button to discuss details with me? Kindly message me to have a quick chat
$20 USD in 7 days
4.4 (14 reviews)
5.1
5.1
User Avatar
Hello Sir I can do "WOOCOMMERCE" job as listed and deliver this in next 1-2 hours at max. I am ready to start right away. Please check my profile for work and experience. Regards Aishu
$25 USD in 1 day
5.0 (28 reviews)
4.7
4.7
User Avatar
Hello, I interested in your project. I need good recommend thus I will work for you with the best service & lowest price. Please send a message to me If you are interested to hire me.
$20 USD in 7 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of POLAND
warszawa, Poland
5.0
3
Payment method verified
Member since Jun 11, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.