Find Jobs
Hire Freelancers

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

€8-30 EUR

Selesai
Disiarkan sekitar 4 tahun yang lalu

€8-30 EUR

Dibayar semasa penghantaran
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 Projek: 24192088

Tentang projek

6 cadangan
Projek jarak jauh
Aktif 4 tahun yang lalu

Ingin menjana wang?

Faedah membida di Freelancer

Tetapkan bajet dan garis masa anda
Dapatkan bayaran untuk kerja anda
Tuliskan cadangan anda
Ianya percuma untuk mendaftar dan membida pekerjaan
Dianugerahkan kepada:
Avatar Pengguna
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 dalam 1 hari
5.0 (760 ulasan)
8.7
8.7
6 pekerja bebas membida secara purata €21 EUR untuk pekerjaan ini
Avatar Pengguna
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 dalam 1 hari
4.9 (56 ulasan)
6.3
6.3
Avatar Pengguna
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 dalam 1 hari
5.0 (91 ulasan)
6.2
6.2
Avatar Pengguna
Hello, I can do this for you. Please send me more details about your project. Thanks. Mostafa kamel
€15 EUR dalam 1 hari
4.9 (47 ulasan)
4.3
4.3
Avatar Pengguna
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 dalam 1 hari
5.0 (9 ulasan)
2.6
2.6
Avatar Pengguna
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 dalam 7 hari
5.0 (5 ulasan)
2.4
2.4

Tentang klien

Bendera ITALY
Verona, Italy
4.9
22
Ahli sejak Sep 14, 2013

Pengesahan Klien

Terima kasih! Kami telah menghantar pautan melalui e-mel kepada anda untuk menuntut kredit percuma anda.
Sesuatu telah berlaku semasa menghantar e-mel anda. Sila cuba lagi.
Pengguna Berdaftar Jumlah Pekerjaan Disiarkan
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuatkan pratonton
Kebenaran diberikan untuk Geolocation.
Sesi log masuk anda telah luput dan telah dilog keluar. Sila log masuk sekali lagi.