Block xmlrpc.php and wp-login.php via NGINX

Block Xmlrpc Wp Login Nginx

You can block xmlrpc.php and wp-login.php via NGINX with the configurations below, what’s good about this approach is that it prevents brute force attacks at the NGINX server level without any PHP/MySQL resources being used. xmlrpc.php for NGINX location = /xmlrpc.php { deny all; } To allow JetPacks IP addresses through adjust the config to…

Read More

Move WooCommerce Product Long Description Into The Short Description Product Layout

Move Woocommerce Long Description

How to move the woocommerce product long description text into the short description product layout with a couple of woocommerce actions and the long description tab removal. Remove The Description Tab This tab by default has the long product description. The above will remove all 3 tabs just comment out which if any tabs you…

Read More

Block Modsec WAF from WordPress Website

Unblock Modsec

You can block modsec WAF from your website via .htaccess with the following code… <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule> This may help when in development, remove when finished to get the protection back. If there is an actual rule you keep triggering you can make an exemption by IP address… # Whitelist 401…

Read More

Change ‘You may also like’ and ‘You may be interested in’ WooCommerce text

Change Woocommerce Text You May Be Intersted In

The text strings ‘You may also like’ and ‘You may be interested in’ in WooCommerce can be changed with the gettext filter…   add_filter( ‘gettext’, ‘bt_translate_like’ ); add_filter( ‘gettext’, ‘bt_translate_like_cart’ ); /** * @snippet Trsnslate “You may also like…” Text – WooCommerce * @how-to Watch tutorial @ https://businessbloomer.com/?p=19055 * @sourcecode https://businessbloomer.com/?p=595 * @author Rodolfo Melogli…

Read More

Show thumbnail images in WooCommerce order emails

Woocommerce Emails With Images

Thumbnail images can be shown in WooCommerce order emails with the filter woocommerce_email_order_items_args add_filter( ‘woocommerce_email_order_items_args’, ‘bt_email_order_items_args’, 10, 1 ); /** * WooCommerce * Show thumbs in Order Email sent to customers */ function bt_email_order_items_args( $args ) { $args[‘show_image’] = true; $args[‘image_size’] = array( 150, 150 ); return $args; } If you want the images to…

Read More

Adding CSS styles into WooCommerce emails

Woocommerce Email Styles

WooCommerce emails can have CSS inline styles added via an action hook woocommerce_email_header, to add your CSS styles use the hook like below… add_action( ‘woocommerce_email_header’, ‘bt_add_css_to_email’ ); /** * WooCommerce * Add inline CSS to emails sent out */ function bt_add_css_to_email() { echo ‘ <style type=”text/css”> h1 { text-align: center !important; color: #c7c9c7; } </style></pre>…

Read More

Changing the WooCommerce coupon text in cart and checkout pages

Woocommerce Change Coupon Code Text

Want to change the WooCommerce coupon text… there are a few areas that need to be tackled namely the cart and the checkout pages, WooCommerce has most of the filters needed and the gettext filter can finish off translating the text string. add_filter( ‘gettext’, ‘bt_rename_coupon_field_on_cart’, 10, 3 ); add_filter( ‘woocommerce_coupon_error’, ‘bt_rename_coupon_label’, 10, 3 ); add_filter(…

Read More