- 3 047
- 3 342 357
WebTask With Hassan
Pakistan
Приєднався 16 лют 2015
In this UA-cam channel ( WebTask With Hassan ) you will find a sufficient and easier knowledge of Php, Wordpress, adobe Photoshop In Urdu/Hindi/English.
Please give it a like, and consider subscribing to the channel for more WordPress, Photoshop, Php videos released every week!
Please Subscribe this channel ( WebTask With Hassan ) to get latest updates.
Thank You
Regards
Hassan Gilani
Please give it a like, and consider subscribing to the channel for more WordPress, Photoshop, Php videos released every week!
Please Subscribe this channel ( WebTask With Hassan ) to get latest updates.
Thank You
Regards
Hassan Gilani
How to Add Custom Redirection After User Registration / Login / Logout in WooCommerce | Redirect
In this woocommerce tutorial for beginners you will learn how to add custom redirection after user registration, login or logout using custom php snippet in wordpress website. So when user create account and register then we are going to redirect user to custom link / page / url and when user login then redirect to custom page and when logout then also redirect to custom url. So in custom code you can add custom url according to your requirement.
* Use this Code for Redirection:
// Redirect after login
add_filter('woocommerce_login_redirect', 'custom_login_redirect', 10, 2);
function custom_login_redirect($redirect, $user) {
return home_url('/shop-2'); // Change to your desired URL
}
// Redirect after registration
add_filter('woocommerce_registration_redirect', 'custom_registration_redirect');
function custom_registration_redirect($redirect) {
// Redirect to a specific page after registration
return home_url('/contact'); // Change to your desired URL
}
// Redirect after logout
add_action('wp_logout', 'custom_logout_redirect');
function custom_logout_redirect() {
wp_redirect(home_url('/about')); // Change to your desired URL
exit;
}
#redirection #redirect #registration #login #logout #register #user #customer #page #url #link #woocommerce #wordpress #wordpresstutorial #webtaskwithhassan #hassangilani
* Use this Code for Redirection:
// Redirect after login
add_filter('woocommerce_login_redirect', 'custom_login_redirect', 10, 2);
function custom_login_redirect($redirect, $user) {
return home_url('/shop-2'); // Change to your desired URL
}
// Redirect after registration
add_filter('woocommerce_registration_redirect', 'custom_registration_redirect');
function custom_registration_redirect($redirect) {
// Redirect to a specific page after registration
return home_url('/contact'); // Change to your desired URL
}
// Redirect after logout
add_action('wp_logout', 'custom_logout_redirect');
function custom_logout_redirect() {
wp_redirect(home_url('/about')); // Change to your desired URL
exit;
}
#redirection #redirect #registration #login #logout #register #user #customer #page #url #link #woocommerce #wordpress #wordpresstutorial #webtaskwithhassan #hassangilani
Переглядів: 19
Відео
How to Change WooCommerce Default User Registration Role in WordPress | Customer Role
Переглядів 62 години тому
In this woocommerce tutorial for beginners you will learn how to change default user register role customer to any user role like subscriber etc. using custom php snippet in wordpress website. So when user create new account in my account page then woocommerce assign customer user role to new account automatically. So you can change that user role to any user role subscriber etc. * Find Code in...
How to Run Custom Code for Specific City in WordPress
Переглядів 124 години тому
In this wordpress tutorial for beginners you will learn how to add php custom snippet / code for specific city in wordpress website. So custom code will execute / insert for city like New York / Washington / Los Angeles etc. user or customer in wordpress. Use this Custom Code & Customize according to your requirement. // Function to get the user's city function get_user_city() { // Get the user...
How to Run Different Custom Code for Different Cities in WordPress
Переглядів 67 годин тому
In this wordpress tutorial for beginners you will learn how to add php custom snippet / codes for different cities in wordpress website. So custom code will execute / insert for city like New York / Los Angeles etc. user or customer in wordpress. Use this Custom Code & Customize according to your requirement. // Function to get the user's city function get_user_city() { // Get the user's IP add...
How to Open Full Screen in Elementor Pro WordPress | Overlay Menu | Desktop & Mobile
Переглядів 167 годин тому
In this wordpress tutorial for beginners you will learn how to build and open full-screen menu in elementor pro website page builder plugin. So first we will create popup then add wordpress menu widget in popup and then add button widget in header instead of menu and then link button widget to popup and display fullscreen menu on desktop / tablet / mobile layout in elementor website. So you can...
How to Create Mega Menu with Elementor Free Version in WordPress
Переглядів 527 годин тому
In this wordpress tutorial for beginners you will learn how to build mega menu in elementor free website page builder plugin version without using pro plugin. So first you will create header / footer using plugin in your website. Then install plugin " Premium Addons for Elementor " and use MEGA MENU widget in header template in website. So go to appearance menu then in menu when you hover then ...
How to Execute Custom Code for Specific Country in WordPress
Переглядів 109 годин тому
In this wordpress tutorial for beginners you will learn how to add php custom snippet / code for specific country in wordpress website. So custom code will run / insert for country like US (united states) / UK / PK etc. user or customer in wordpress. Use this Custom Code & Customize according to your requirement. // Function to get the user's country code function get_user_country() { // Get th...
How to Execute Different Custom Codes for Different Countries in WordPress
Переглядів 119 годин тому
In this wordpress tutorial for beginners you will learn how to add php custom snippet / code for different countries in wordpress website. So custom code will run / insert for country like US (united states) / UK / PK etc. user or customer in wordpress. Use this Custom Code & Customize according to your requirement. // Function to get the user's country code function get_user_country() { // Get...
How to Add Image Zoom Content Box Widget in Elementor WordPress
Переглядів 2512 годин тому
In this wordpress tutorial for beginners you will learn how to image zoom content box widget using plugin " Unlimited Elements For Elementor (Free Widgets, Addons, Templates) " in elementor website page builder plugin in website. So first install plugin then install this image zoom content box widget and then you can add this widget on any page and do setting according to your requirement and c...
How to Add Single Video Player in Wix Website | Upload Self Hosted Video
Переглядів 612 годин тому
In this wix tutorial for beginners you will learn how to add single video player in wix site. So you can upload your self hosted video from your system and then add in element / widget and video will play or display on wix website. #video #selfhosted #player #wix #wixsite #wixwebsite #wixtutorial #webtaskwithhassan #hassangilani
How to Add Custom Message on Cart Page in WooCommerce WordPress | Notice
Переглядів 1712 годин тому
In this woocommerce tutorial for beginners you will learn how to display custom message on cart page using php snippet in wordpress website. So after adding code then message show on cart page. Find Custom Code in Top Pinned Comment Section. #cart #message #product #wpcode #woocommerce #wordpress #wordpresstutorial #webtaskwithhassan #hassangilani
How to Add Conditional Custom Message on Cart Based Product Quantity in WooCommerce WordPress
Переглядів 4312 годин тому
In this woocommerce tutorial for beginners you will learn how to display custom conditional message on cart page based on products quantity using php snippet in wordpress website. So in custom code we set quantity number if product quantity greater then 0 or 1 then we will show message otherwise custom message / notice hide. Find Custom Code in Top Pinned Comment Section. #cart #message #quanti...
How to Check Plugins Compatibility with WordPress Versions | Latest Version
Переглядів 2314 годин тому
In this wordpress tutorial for beginners you will learn how to check plugin compatibility with wordpress latest or old versions in website. So you can install this plugin " Plugin Compatibility Checker " and then you see all detail regarding plugin with current version / update version / php and wordpress version. #version #plugin #compatibility #plugins #wordpress #wordpresstutorial #webtaskwi...
How to Check Themes & Plugins Compatibility with PHP Version WordPress | PHP Compatibility Checker
Переглядів 2314 годин тому
In this wordpress tutorial for beginners you will learn how to check theme and plugin compatibility with php latest or old versions in wordpress website. So you can install this plugin " PHP Compatibility Checker " and scan it and then you see all results with theme and plugin with different php versions and you see all details and error compatibility with php version. #php #theme #plugin #comp...
How to Limit Purchase of Specific Product Once Per Order in WooCommerce | Buy One Product Quantity
Переглядів 1914 годин тому
In this woocommerce tutorial for beginners you will learn how to limit users / customer to buy particular product only one time in one order with their account and can not purchase the same product again with their customers account with same order. So you can purchase that specific product again in new Order. So we will add custom php snippet using wpcode to allow product to purchase once. So ...
How to Add Order Again Button in for All Order Statuses in My Account Orders in WooCommerce | Status
Переглядів 1714 годин тому
How to Add Order Again Button in for All Order Statuses in My Account Orders in WooCommerce | Status
How to Create Header & Footer using Jeg Elementor Kit Plugin in Elementor Free Version in WordPress
Переглядів 6019 годин тому
How to Create Header & Footer using Jeg Elementor Kit Plugin in Elementor Free Version in WordPress
How to Fix Error 404 The Preview Could Not Be Loaded in Elementor WordPress | Troubleshooting
Переглядів 2219 годин тому
How to Fix Error 404 The Preview Could Not Be Loaded in Elementor WordPress | Troubleshooting
How to Create Mega Menu in Elementor Pro WordPress
Переглядів 2919 годин тому
How to Create Mega Menu in Elementor Pro WordPress
How to Update / Add Form Confirmation Message & Show After Submission in Wix Website
Переглядів 1521 годину тому
How to Update / Add Form Confirmation Message & Show After Submission in Wix Website
How to Delete Contact in Wix Dasboard | Contacts List
Переглядів 621 годину тому
How to Delete Contact in Wix Dasboard | Contacts List
How to Delete Automations in Wix Dashboard | Form Automation
Переглядів 8День тому
How to Delete Automations in Wix Dashboard | Form Automation
How to View / Delete Contact Form Submissions in Wix Dashboard
Переглядів 8День тому
How to View / Delete Contact Form Submissions in Wix Dashboard
How to Add Email Address in Contact Form in Wix | Form Automation | Email Addresses | New Method
Переглядів 17День тому
How to Add Email Address in Contact Form in Wix | Form Automation | Email Addresses | New Method
How to Run PHP Custom Code for Logged-Out User Only in WordPress
Переглядів 17День тому
How to Run PHP Custom Code for Logged-Out User Only in WordPress
How to Execute PHP Custom Code for Logged-In Users Only in WordPress | is_user_logged_in
Переглядів 48День тому
How to Execute PHP Custom Code for Logged-In Users Only in WordPress | is_user_logged_in
How to Run PHP Custom Code in Desktop Only in WordPress
Переглядів 20День тому
How to Run PHP Custom Code in Desktop Only in WordPress
How to Execute PHP Code in Mobile Device Only in WordPress | Add Custom Code
Переглядів 16День тому
How to Execute PHP Code in Mobile Device Only in WordPress | Add Custom Code
How to Customize / Edit Message " Product Has Been Added To Your Cart " in WooCommerce WordPress
Переглядів 31День тому
How to Customize / Edit Message " Product Has Been Added To Your Cart " in WooCommerce WordPress
How to Find Sub Domain Subdirectory Folder / Path / URL in iPage Hosting
Переглядів 914 днів тому
How to Find Sub Domain Subdirectory Folder / Path / URL in iPage Hosting
I just want to add a small description about the product below the product title. not link. for that I chose "Text" in ACF and followed the video. but the snippet code shows error on line 5. Line: $link_url = $link['url']; can you please help?
very good explicacion
Thank you so much dude
THIS DUDE IS A GOD!!! I tried watching someone else video seven times and got lost. Watched this one and fixed my issue in under 1:02 sec!!! you got a sub!
good video but when i m in game the full screen icon if i go to it but i don't click i can not change to full screen i saw a other video that the guy played webbrowser game went to to full screen icon and he had so much options to choose from full screen portrait screen and etc but he did not mention the name do you know it ?
Hassan, Do you have telegram? I don't seem to find you on Facebook
my facebook page link is attached in youtube.. so message me on facebook page...
Lovely ❤❤
thank you :)
CHECKOUT THIS NEW VIDEO FOR CUSTOM REDIRECTION IN WOOCOMMERCE... ----------- How to Add Custom Redirection After User Registration / Login / Logout in WooCommerce | Redirect ua-cam.com/video/bQ7ZygAunIA/v-deo.html
Great job hassan. Your contents has been great. Hassan please I do have a request, I'm a junior developer and I want us to be friends. I want to be able to reach you outside UA-cam and learn somethings from you. Can I send you an email please? 🙏
ok you can send me or message me on my facebook page...
@WebTaskWithHassan Thank you Hassan. I will. Can I get your email too?
Use this code: add_action('woocommerce_created_customer', 'set_custom_user_role'); function set_custom_user_role($customer_id) { // Change 'customer' to your desired role $user = new WP_User($customer_id); $user->set_role('subscriber'); // e.g., 'subscriber', 'editor', etc. }
Please share this plugin
that plugin is old and closed now.. you can checkout this new video and let me know I created new video for custom redirection in woocommerce... ---------- How to Add Custom Redirection After User Registration / Login / Logout in WooCommerce | Redirect ua-cam.com/video/bQ7ZygAunIA/v-deo.html
very nice , thanks
You are welcome :)
Invalid backend help me please!
when you export wordpress from wp file manager then you see invalid backend error?
Idk why but its not working in my wordpress site.
i checked code is working fine... i have other videos also.. you can check this video.. How to Show Product Title With SKU Number in Admin Orders List in WooCommerce WordPress ua-cam.com/video/zjCfIebBnbM/v-deo.html
not work adobe priemer 2020,compresion not
How to make filter in elementor?
what functionality you want with filter in elementor wordpress?
Thank you so much!
You are welcome :)
This plugin is really cool and great! However, it claims to translate the modal based on the user's country. I tested it using Germany and Netherlands VPS, and while the modal correctly detects the country, the text is still in English. I need assistance with this.
you need to customize this plugin to change test for different countries.. i will check on that plugin.... ---------------- meanwhile you can checkout these video.. redirect without popup.. ----------- 1- How to Redirect Visitor to Different Page / Url Based on Country WordPress | IP2Location Redirection ua-cam.com/video/KfpboSTI2Vk/v-deo.html ----------- 2- How to Redirect Visitor From Specific Country using Custom Code in WordPress | API [Redirection] ua-cam.com/video/WLXGh94EDzg/v-deo.html ------------- 3- How to Redirect Visitor From Different Countries to Different Page / Url using Custom Code WordPress ua-cam.com/video/dGWK0LuW6vU/v-deo.html
@@WebTaskWithHassan I would appreciate it if you check that plugin. Your given links also look fine and informative, but I prefer to stay with the modal system-it looks good. It would be very helpful if you check this plugin and find out the translation issue.
Thanks mate :)
you are welcome 👍
thnk you
you are welcome :)
Your video was GREAT help, thanks again
you are welcome :)
Salami and LEGO to you my friend!
not working
Very helpful thanks
you are welcome :)
Kya Me Isko PayPal Ki Jagah Razorpay Use Kar Sakta Hu. Iska Code De Please
so good but im having problems when im trying to recover my password. i dont get any email.
salam can you give me your number need to ask some question regarding how can i get lead on whatsapp through wordpress elementor form
checkout this video... How to Redirect Elementor Form to WhatsApp in WordPress ua-cam.com/video/nkI23v80Zgs/v-deo.html
This doesn't help at all. What you want to do is download a formatted PDF upon submission of the data just entered. Not some random static file.
Excellent
thank you :)
perfection. works like a charm. in any theme.
you are welcome :)
Use this code: add_action( 'woocommerce_before_cart', 'custom_cart_message_page' ); function custom_cart_message_page() { echo '<div class="custom-cart-message woocommerce-info">Thank you for shopping with us! Enjoy free shipping on orders over $50.</div>'; }
Use this code: add_action( 'woocommerce_before_cart', 'custom_cart_message' ); function custom_cart_message() { if ( WC()->cart->get_cart_contents_count() > 0 ) { echo '<div class="custom-cart-message woocommerce-info">Thank you for shopping with us! You have One Product in Cart. Enjoy free shipping on orders over $50.</div>'; } }
Excellent
thank you :)
LOL :((
what issue in website you are facing?
Use this code: add_filter('woocommerce_add_to_cart_validation', 'limit_product_to_one', 10, 3); add_action('woocommerce_cart_updated', 'restrict_cart_quantity'); function limit_product_to_one($passed, $product_id, $quantity) { // Replace '5180' with the ID of the product you want to limit $limited_product_id = 5180; // Check if the product being added is the limited product if ($product_id == $limited_product_id) { // Check if the product is already in the cart $cart = WC()->cart->get_cart(); foreach ($cart as $cart_item) { if ($cart_item['product_id'] == $limited_product_id) { wc_add_notice(__('You can only purchase one of this product.'), 'error'); return false; // Prevent adding the product to the cart } } } return $passed; // Allow adding the product to the cart } function restrict_cart_quantity() { // Replace '5180' with the ID of the product you want to limit $limited_product_id = 5180; // Get the cart contents $cart = WC()->cart->get_cart(); foreach ($cart as $cart_item_key => $cart_item) { if ($cart_item['product_id'] == $limited_product_id) { // If the quantity is greater than 1, set it back to 1 if ($cart_item['quantity'] > 1) { WC()->cart->set_quantity($cart_item_key, 1); wc_add_notice(__('You can only purchase one of this product.'), 'error'); } } } }
Use this code: // Modify "Order Again" button to add products to cart add_action('woocommerce_my_account_my_orders_actions', 'custom_order_again_redirect', 10, 2); function custom_order_again_redirect($actions, $order) { if ($order->has_status('completed') || $order->has_status('processing') || $order->has_status('on-hold') || $order->has_status('cancelled') || $order->has_status('refunded')) { $actions['order-again'] = array( 'url' => wp_nonce_url(add_query_arg('order_again', $order->get_id(), wc_get_cart_url()), 'woocommerce-order-again'), 'name' => __('Order Again', 'woocommerce'), ); } return $actions; } // Handle the order again action add_action('template_redirect', 'handle_order_again_action'); function handle_order_again_action() { if (isset($_GET['order_again']) && !empty($_GET['order_again'])) { $order_id = absint($_GET['order_again']); $order = wc_get_order($order_id); if ($order) { foreach ($order->get_items() as $item_id => $item) { $product_id = $item->get_product_id(); $quantity = $item->get_quantity(); WC()->cart->add_to_cart($product_id, $quantity); } wp_redirect(wc_get_cart_url()); exit; } } }
sir mujhey apney website ka wordpress version , woo commerce version hide karne hai for security purpose. Kiase karey ?
Bro client ko website kase deni ha aur payment kase leni ha
Ap yeh kaam ker rehay hai ya start kerna chahtay hai? website ap live domain pay bhi create ker saktay hai aur local host pay bhi... agar ap website client ki domain pay create ker rehay hai tu payment advance lay half aur agar client foreigner hai tu wo payment ap kay bank account may send ker sakta using any app.. aur agar website ap localhost pay bana rehay hai tu website ap apnay system pay banaye aur phir client say pesay lay ker usko send ker day zip file may...agar wo khud apnay domain pay upload ker sakta hai tu theak werna ap uski domain pay website upload ker day..
@@WebTaskWithHassan Thanks bro mein ya kaam Karna chahta ho
ap nay kaam seehkna ya apko yeh web kaam phelay say ata hai?
@@WebTaskWithHassanseekhna ha
😊😊
thank you :)
What if want it for only one particular product on website? means user can buy other products as many they want but only one of the product needs to be limit to one only.
Checkout this video... How to Limit Purchase of Specific Product Once Per Order in WooCommerce | Buy One Product Quantity ua-cam.com/video/k8woCpTiq7c/v-deo.html
Thank you so much... It is very useful and I have used it in my project
You are most welcome :)
Thanks this is fantasic I want code for order again irrespective of order status Is it possible
checkout this video... How to Add Order Again Button in for All Order Statuses in My Account Orders in WooCommerce | Status ua-cam.com/video/8hfo1jry3AI/v-deo.html
hmm...didn't work for me :/
checkout this code and let me know... i added priority in code... add_action( 'woocommerce_before_checkout_billing_form', 'wtwh_echo_notice_shipping', 10 ); function wtwh_echo_notice_shipping() { echo '<div class="shipping-notice woocommerce-info">Please allow 5-10 business days for delivery after order processing.</div>'; }
You're the GOAT! Short and straight to the point. You even wrote it on the video's description!
thank you :)
thankssss
You're welcome :)
Very well explained thanks sir
You're welcome! :)
indish english per excellance
Amazing bro, thank you!!
You are welcome! :)