Delete / remove user role in Woocommerce
Free shipping and gift message Woocommerce
and programmatically add gift to cart
Add customer in Mailerlight group on order completion
After the order is set to completed, we trigger the mailerlight api to add the customer in a group
Add product programmatically to cart based on cart total
This product can cost zero and so make it a gift
Animated badge at the bottom of the page WordPress
How to add Body background image
New badge on product loop item
Use this snippet to add a new badge on the product loop, then using css you can change the design to mach your theme.
Capitalize words in Woocomerce product titles
add this in functions.php, save then refresh once your site and then remove the snippet.
Custom TranslatePress Language Switcher Shortcode
Example: EL | EN
display product categories in shop page
Enable shortcodes in WordPress menu navigation
To use a shortcode inside a WordPress menu, you need to ensure that WordPress processes shortcodes in the wp_nav_menu output. The code snippet enables shortcodes …
Delete records in MySQL from the bmh_actionscheduler_logs table where the log_date_gmt is before a specific date
To delete records in MySQL from the bmh_actionscheduler_logs table where the log_date_gmt is before a specific date and time (2024-12-02 14:11:20), you can execute the …
Delete records in the bmh_woocommerce_sessions table where the session_key starts with t_
To delete records in the bmh_woocommerce_sessions table where the session_key starts with t_, you can use the following SQL query: Explanation: Make sure you back …
Woocommerce: Automatically add coupon code for wholesale roles
Woocommerce: add items to processing orders
This only works if the customer has processing cash on delivery orders
Woocommerce:Recalculate orders with status completed
Woocommerce: Search customers in ajax based on billing phone num
in this example, we add two fields, one billing_phone and another phone, you can replace either one to use a custom field
Shipping class message in single product page Woocommerce
We will display a message in the frontend based on the shipping class chosen. Based on the shipping class slug we will display the class …
How to embed a lottie animation in wordpress and Elementor with code snippet
This method works without any plugin, by adding the snippet in an HTML block in Gutenberg or Elementor you can embed the lottie. If you …
Allow .json file upload in WordPress (error: Sorry, you are not allowed to upload this file type.)
By using the snippet bellow, you set your wordpress website to allow .json files to be uploaded in the media section.
Hide admin toolbar in WordPress from all users except admins
How to add Bootstrapp in WordPress CSS and Js
You can easily use Bootstrap in your wordpress website, by adding the snippet bellow. With that code, we link the Bootstrap CSS and Javascript files …
In Woocommerce, we can influence the way that related products are shown in the single product page. When using the Yoast SEO plugin, we have …
Custom Mega Menu in wordpress (Astra theme) without a plugin
I have come up with this css that will enable you to create a mega menu in Astra by using special css classes in the …
Woocommerce, Pre-Check Terms and conditions box for old users (that have previously accepted it)
Customer retention depends on a smooth purchasing experience, and this is why the “Automatically Accept Terms for Returning Customers” snippet is made to improve your …