Find Jobs
Hire Freelancers

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

€8-30 EUR

Concluído
Publicado há aproximadamente 4 anos

€8-30 EUR

Pago na entrega
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 do Projeto: 24192088

Sobre o projeto

6 propostas
Projeto remoto
Ativo há 4 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
Concedido a:
Avatar do Usuário
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 em 1 dia
5,0 (760 avaliações)
8,7
8,7
6 freelancers estão ofertando em média €21 EUR for esse trabalho
Avatar do Usuário
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 em 1 dia
4,9 (56 avaliações)
6,3
6,3
Avatar do Usuário
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 em 1 dia
5,0 (91 avaliações)
6,2
6,2
Avatar do Usuário
Hello, I can do this for you. Please send me more details about your project. Thanks. Mostafa kamel
€15 EUR em 1 dia
4,9 (47 avaliações)
4,3
4,3
Avatar do Usuário
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 em 1 dia
5,0 (9 avaliações)
2,6
2,6
Avatar do Usuário
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 em 7 dias
5,0 (5 avaliações)
2,4
2,4

Sobre o cliente

Bandeira do(a) ITALY
Verona, Italy
4,9
22
Membro desde set. 14, 2013

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.