Skip to main content

Posts

Showing posts from March, 2020

Easily include Seller Bank details in On-hold Order Email WCFM

Do you have a scenario when using WCFM , you would want to allow buyer to directly pay to seller bank account by bank transfer? Well I do. This is due our Marketplace offered free service to sellers. At the beginning we charge them some commission fees, but that does not really work. As the job to handle the delivery is more troublesome with our limited resources and our sellers are not coming from big companies who are willing to pay higher commission fees. I'm going to share with you how easily you can add the Seller account details on the Customer on-hold order email template. I'm adding this in an extended child-theme ..okay. Never write in the original Woocommerce plugin module, nor the parent theme module. That is 100% wrong, as LATER on, you will have trouble to manage and upgrade the theme and plugins to the latest version. Add the Woocommerce template directory in child theme Create the directory for Woocommerce emails and copy the file over. Update the c

The right way to load Javascript and CSS files in Wordpress.

The way we load Javascript and CSS files in Wordpress is different from the normal HTML way. First of all, we need to identify where do we want to load the scripts. Is it in our theme or plugin?. Lets say we want to load it to  our theme, we can easily create a new folder in our child theme and place the scripts in it. for example Then we can load it in our child theme functions.php file. Ok when we load, we need to understand the parameters that we want to pass in... for wp_enqueue_styles is quite straight forward. but for wp_enqueue_script.. Pay attention on deps parameter. whether the script that we want to load has dependencies with other scripts / jquery. Same goes to in_footer parameter, do we want to load in header or before the body closing tag. If we do not define properly. Our scripts might not be loaded properly. Pay attention on those two parameters.