Blog

Round Off Prices in woocommerce

folder_openCoding, Snippets
commentNo Comments
PHP add_filter( 'woocommerce_get_price_excluding_tax', 'round_price_product', 10, 1 ); add_filter( 'woocommerce_get_price_including_tax', 'round_price_product', 10, 1 ); add_filter( 'woocommerce_tax_round', 'round_price_product', 10, 1); add_filter( 'woocommerce_get_price', 'round_price_product', 10, 1); function round_price_product( $price ){ // Return rounded price return round( $price ); } 123456789 add_filter( 'woocommerce_get_price_excluding_tax', 'round_price_product',…
Click Me

Iterate Table Content in PHP

folder_openCoding, Snippets
commentNo Comments
PHP $tableString = '<table> <tbody> <tr> <td class="col-xs-12 col-sm-12 col-lg-6 floatimp">Snygg vindjacka i unisexmodell av vattenavvisande 100% Taffeta nylon. I kragen ligger en huva gömd. Dragsko nertill. Finns i 15 olika färger. Finns i dammodell och heter B&C Sirocco W.<strong>Material</strong>100%…
Click Me

Custom Loops in wooCommerce

folder_openSnippets, Coding
commentNo Comments
It’s tricky to track the changes. Sometimes, It’s preferable to get custom loop and adjust your template to get things done. Listing here the frequent queries related to woocommerce. Get Featured Products  Featured Products Listing PHP $meta_query = WC()->query->get_meta_query(); $meta_query[]…
Click Me
Menu