Find Jobs
Hire Freelancers

function.php add filter just for one role (wordpress)

€8-30 EUR

Finalizat
Data postării: circa 4 ani în urmă

€8-30 EUR

Plata la predare
Hello, I need the filter below to work only for the contributor role. The filter is inside the wordpress [login to view URL] Thanks /** * */ add_filter('wppizza_filter_orders_query', 'myprefix_admin_orderhistory_query_filter'); function myprefix_admin_orderhistory_query_filter($query){ $today = date('Y-m-d',current_time('timestamp')); $yesterday_start = date('Y-m-d',strtotime("-0 days")); $today_end = $today.' 23:59:59'; /* edit/alter the query where clause */ $query = str_ireplace('WHERE', 'WHERE order_date>="'.$yesterday_start.'" AND order_date<="'.$today_end.'" AND ', $query); return $query; }
ID-ul proiectului: 24192088

Despre proiect

6 propuneri
Proiect la distanță
Activ: 4 ani în urmă

Vrei să câștigi bani?

Avantajele de a licita pe platforma Freelancer

Stabilește bugetul și intervalul temporal
Îți primești plata pentru serviciile prestate
Evidențiază-ți propunerea
Te înregistrezi și licitezi gratuit pentru proiecte
Acordat utilizatorului:
Avatarul utilizatorului
Hi there, Here is the code add_filter('wppizza_filter_orders_query', 'myprefix_admin_orderhistory_query_filter'); function myprefix_admin_orderhistory_query_filter($query){ $user = wp_get_current_user(); if ( !in_array( 'contributor', (array) $user->roles ) )return $query; $today = date('Y-m-d',current_time('timestamp')); $yesterday_start = date('Y-m-d',strtotime("-0 days")); $today_end = $today.' 23:59:59'; /* edit/alter the query where clause */ $query = str_ireplace('WHERE', 'WHERE order_date>="'.$yesterday_start.'" AND order_date<="'.$today_end.'" AND ', $query); return $query; } Regards, Ashok
€25 EUR în 1 zi
5,0 (760 recenzii)
8,7
8,7
6 freelanceri plasează o ofertă medie de €21 EUR pentru proiect
Avatarul utilizatorului
Hi, Yes, Tell me what changes you want in the file code. I am available and can assist you in the technical part. Thanks
€19 EUR în 1 zi
4,9 (56 recenzii)
6,3
6,3
Avatarul utilizatorului
Hello, I have gone through your requirements and understand what you need. I am a Web developer with 7 years experience I have used a lot of technology to implement my clients solutions. List of Services that i can help you - Build custome web applications using Native PHP with all php versions - Build custome web applications using PHP Frameworks ( Codeigniter - Laravel - Cakephp) - Using PHP CMS ( Wordpress - Drupal - Joomla) - Website Management - Server or Website maintenance and technical support - Data Scraping - RestAPI - SDK ( google map - Facebook - Twilio ) - Version control using (Git - Bitbucket) I look forward to speaking with you about this opportunity. I'm mostly on the internet, we can talk there in a fast way. Thanks & Regards Elia Fawzy
€30 EUR în 1 zi
5,0 (91 recenzii)
6,2
6,2
Avatarul utilizatorului
Hello, I can do this for you. Please send me more details about your project. Thanks. Mostafa kamel
€15 EUR în 1 zi
4,9 (47 recenzii)
4,3
4,3
Avatarul utilizatorului
hii, I am looking for work in WordPress | Woocommerce.I have 4+ more years experience in WordPress. I can do customization theme integration customization in WordPress.I work from wordpress full-time at home. If you have a WordPress job, give me a chance. let's chat for further discussion Thank you, Chirag Patel
€15 EUR în 1 zi
5,0 (9 recenzii)
2,6
2,6
Avatarul utilizatorului
16) Web: Hey there, I see you’re looking for somebody who are experienced graphic designer and web designer for your business Nano Journey … I have 5+ years of experience in Adobe Photoshop, Illustrator, UI/UX, JS, Bootstrap, HTML/CSS, Theme design, WordPress, Theme customization, API integration, Payment Gateway, PHP, Laravel, Plugin development, software testing and much more.
€19 EUR în 7 zile
5,0 (5 recenzii)
2,4
2,4

Despre client

Steagul ITALY
Verona, Italy
4,9
22
Membru din sept. 14, 2013

Verificarea clientului

Mulțumim! Ți-am trimis prin e-mail linkul pe care trebuie să-l accesezi pentru a revendica creditul gratuit.
A apărut o eroare la trimiterea e-mailului. Încearcă din nou.
Utilizatori înregistrați Totalul proiectelor postate
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Se încarcă previzualizarea
S-a oferit permisiunea de depistare a locației.
Ți-a expirat sesiunea pentru conectare sau te-ai deconectat. Conectează-te din nou.