How to change WordPress default email’s From name and address

You are probably reading this post because have already noticed, that every time someone submitted a comment on your blog, signed up as a user or did anything that required WordPress to generate and send an email, by default the “From Name” in that message appeared as “WordPress” and “From” address was “wordpress@your-domain.com”. If this[…]

Prestashop – How To Change Home Feature Product Deafult Sorting in PHP

By default Prestashop Home Feature product module is sorted by position. If you would like to change it to sort by date (Latest products show first), you need to change the homefeatured.php under ‘modules’ –> ‘homefeatured’. Before you do the following changes, please make sure you make a backup in case something goes wrong. Let’s[…]

WooCommerce – Change “Proceed to PayPal” Text on Checkout button

add_filter( ‘gettext’, ‘custom_paypal_button_text’, 20, 3 ); function custom_paypal_button_text( $translated_text, $text, $domain ) { switch ( $translated_text ) { case ‘Proceed to PayPal’ : $translated_text = __( ‘NEW BUTTON TEXT’, $domain ); break; } return $translated_text; } That’s all !! Views (505) [Total: 1    Average: 2/5]

WooCommerce – Allow only one product in Cart

This snippet can be used for many ways. For instance, your store only allows to buy one product at a time such as “Buy Now”. Open functions.php under your activated theme and put the code below: // Only one product in cart add_filter( ‘woocommerce_add_cart_item_data’, ‘only_one_product_in_cart’ ); function only_one_product_in_cart( $cart_item_data ) { global $woocommerce; $woocommerce->cart->empty_cart(); return[…]

Customised WordPress Admin Filters in the backoffice

Creating the Select Drop Down Using the ‘restrict_manage_posts’ Filter The first thing that needs to be done is the creation of the select drop down for the two additional filters we will be making. You will need to navigate over to your child themes functions.php file (or another applicable file) and add code which will[…]

WooCommerce – Redirect to a custom page after logging out

By default, WooCommerce will redirect customers to the My Account page after logging out. However, you may want them to go somewhere else – here’s how. Firstly, you’ll need to make sure that you are overriding the default WooCommerce template files in your theme. If you’ve already got a woocommerce folder in your theme’s directory,[…]

WooCommerce – Redirect to a custom page after logging in based on the user role

By default WooCommerce redirects the user to the My Account page after a successful login. You may change this and use a custom URL based on the user role, like the Dashboard for admins and My Account page for customers. To do this, add this code at the end of the file functions.php located in[…]

WooCommerce – Redirect to a custom page after logging in for All Users

Sometimes you may want to send users to a unique or custom URL after logging in through WooCommerce. No need for additional plugins or complicated code. Just add the following code to the custom functions area of your functions.php file. // Custom redirect for users after logging in add_filter(‘woocommerce_login_redirect’, ‘wcs_login_redirect’); function wcs_login_redirect( $redirect ) {[…]