Find Jobs
Hire Freelancers

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

€8-30 EUR

已完成
已发布大约 4 年前

€8-30 EUR

货到付款
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: 24192088

关于此项目

6提案
远程项目
活跃4 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
颁发给:
用户头像
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 在1天之内
5.0 (760条评论)
8.7
8.7
6威客以平均价€21 EUR来参与此工作竞价
用户头像
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 在1天之内
4.9 (56条评论)
6.3
6.3
用户头像
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 在1天之内
5.0 (91条评论)
6.2
6.2
用户头像
Hello, I can do this for you. Please send me more details about your project. Thanks. Mostafa kamel
€15 EUR 在1天之内
4.9 (47条评论)
4.3
4.3
用户头像
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 在1天之内
5.0 (9条评论)
2.6
2.6
用户头像
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 在7天之内
5.0 (5条评论)
2.4
2.4

关于客户

ITALY的国旗
Verona, Italy
4.9
22
会员自9月 14, 2013起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。