Find Jobs
Hire Freelancers

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

€8-30 EUR

Completato
Pubblicato circa 4 anni fa

€8-30 EUR

Pagato al completamento
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; }
Rif. progetto: 24192088

Info sul progetto

6 proposte
Progetto a distanza
Attivo 4 anni fa

Hai voglia di guadagnare un po'?

I vantaggi delle offerte su Freelancer

Imposta il tuo budget e le scadenze
Fatti pagare per il lavoro svolto
Delinea la tua proposta
La registrazione e le offerte sui lavori sono gratuite
Assegnato a:
Avatar dell'utente
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 in 1 giorno
5,0 (760 valutazioni)
8,7
8,7
6 freelance hanno fatto un'offerta media di €21 EUR
Avatar dell'utente
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 in 1 giorno
4,9 (56 valutazioni)
6,3
6,3
Avatar dell'utente
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 in 1 giorno
5,0 (91 valutazioni)
6,2
6,2
Avatar dell'utente
Hello, I can do this for you. Please send me more details about your project. Thanks. Mostafa kamel
€15 EUR in 1 giorno
4,9 (47 valutazioni)
4,3
4,3
Avatar dell'utente
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 in 1 giorno
5,0 (9 valutazioni)
2,6
2,6
Avatar dell'utente
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 in 7 giorni
5,0 (5 valutazioni)
2,4
2,4

Info sul cliente

Bandiera: ITALY
Verona, Italy
4,9
22
Membro dal set 14, 2013

Verifica del cliente

Grazie! Ti abbiamo inviato tramite email il link per richiedere il tuo bonus gratuito.
Non è stato possibile inviarti l'email. Riprova per piacere.
di utenti registrati di lavori pubblicati
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Caricamento anteprima
Autorizzazione per la geolocalizzazione concessa.
La tua sessione è scaduta ed è stato effettuato il log out. Accedi nuovamente per piacere.