WooCommerce add product to cart with price override

some times we need to woocommerce change product price programmatically. add_action( ‘woocommerce_before_calculate_totals’, ‘add_custom_price’ ); function add_custom_price( $cart_object ) { $custom_price = 10; // This will be your custome price foreach ( $cart_object->cart_contents as $key => $value ) { $value[‘data’]->price = $custom_price; // for WooCommerce version 3+ use: // $value[‘data’]->set_price($custom_price); } }

Flexslider for WordPress Native Gallery

WordPress plugin that create an awesome flexslider gallery instead of the default static thumbnails.No custom classes or extra posts necessary, just use the normal add media button and the nice gallery editor already available. WordPress plugin that hacks the gallery[id=”1,22,… etc “] shortcode to display a clean basic flexslider instead of the default static thumbnails. […]

Adminbar Default Menu Manager

Plugin help to remove some default admin bar menus. WordPress logo,sitename,comments,updates,loginout etc can be easily removed. Also you can change the color of the adminbar for frontend. Clean code and efficient. Features: Remove wordpress logo,credit menu from adminbar/tool bar. Remove update menu from adminbar. Remove logout option from tool bar. Remove site name link. See […]

Uploading local folder and files to server easily using terminal

If your server setup support SSH then use following code to upload the folders from local system. scp -r mydirectory [email protected]:destdir The -r means “recursive” so it will recursively copy the entire directory. Replace username with your username, etc., etc. destdir is a relative path on the remote server (whatever directory you wind up in if you log in) as long […]

Foundation sites 6.5.x with angular 7.x

Step 1: Create a new angular app by following command. ng new my-foundation-app Step 2: change directory to new created app folder. cd my-foundation-app Step 3: Install foundation modules. npm install foundation-sites –save check your project directory. under node_modules there will be another folder named “foundations-sites” will be created. Step 4: Open src/style.scss file and add […]

Creating first Angular 6 Application in Mac

This is angular 6 tutorial for beginners. Steps you need to do is: Install Nodejs Install NPM(Package manager will automatically install while installing Nodejs) Install Angular Cli Download IDE for development. For creating web application you need to first to install node JS. For installing node JS in Mac follow the steps. Goto https://nodejs.org/en/ Download LTS […]