Hello guys how are you? Welcome back to my channel. Today in this post I am going to show you Making the Commission Fee to be Added to the WooCommerce Product | Dokan Multivendor | WordPress.
Guys if you are new in WordPress or in WooCommerce then please check the below links for some good tutorials:
Guys here is the working code snippet for Woocommerce – Hide a shipping method if cart total is higher than an amount and please use carefully:
1. Guys here is the code snippet and you need to add your theme’s functions.php file:
add_filter( 'woocommerce_get_price_html', 'therich_alter_price_display', 9999, 2 ); function therich_alter_price_display( $price_html, $product ) { // ONLY ON FRONTEND if ( is_admin() ) return $price_html; // ONLY IF PRICE NOT NULL if ( '' === $product->get_price() ) return $price_html; // if ( wc_current_user_has_role( 'customer' ) ) { $orig_price = wc_get_price_to_display( $product ); $price_html = wc_price( $orig_price * 1.80 ); // } return $price_html; }
This is it guys and if you will have any kind of query, suggestion or requirement then feel free to comment below.
Jassa
Developer’s King
Thanks
Recent Comments