Skip to content

Category: Snippets

Change the from name and from email in WordPress

This is a classic, and therefore deserves a short post: changing the name and address of the sender in WordPress email sends. By default, WordPress will use something like WordPress wordpress@example.com. If you want to change it, and improve the user experience a little more, then I’ll show you how to do it, it’s very … Continued

Separate in multiple lines when we add the same product more than once to the cart

Sometimes, it is interesting to be able to separate the same product in multiple lines of the WooCommerce cart, with different quantities in each line. This can be interesting when selling by weight, since the customer may want to buy different amounts of the same product (to separate it into bags, for example). In order … Continued

Integrate earned revenue column in Woocommerce coupons

In order to add a column showing the income obtained by each Woocommerce coupon, we must use a filter and an action: manage_edit-shop_coupon_columns:With this filter we have access to the columns of the Woocommerce coupons table that we find in the WordPress administration page (wp-admin). Through this filter we will add a new column of … Continued

Change new user email content in WordPress

To change the content of the new user registration notification email in WordPress, which is sent to said user, we have a specific filter: wp_new_user_notification_email With this filter, we have access to: recipient’s email address (by default that of the new user created), email subject, email body, email headers. For example, here is the snippet … Continued