WOOCS - WooCommerce Para Birimi Değiştirici


YITH WooCommerce Rol Bazlı Fiyatlar

Eklenti URL'si: https://yithemes.com/themes/plugins/yith-woocommerce-role-based-prices/

Bu, mini sepetle ilgili hatayı düzeltmez ve WOOCS koduna bağlı değildir

//wp theme functions.php dosyanıza sonraki tüm kodu ekleyin: add_filter('yith_ywcrbp_sale_price', 'woocs_yith_ywcrbp_sale_price', 10, 2); function woocs_yith_ywcrbp_sale_price($sale_price, $product) { if (class_exists('WOOCS')) { global $WOOCS; if ($WOOCS->is_multiple_allowed) { $carrrent = $WOOCS->current_currency; if ($carrrent != $WOOCS->default_currency) { $currencies = $WOOCS->get_currencies(); $oran = $para birimleri[$carrrent]['oran']; $indirimli_fiyat = $indirimli_fiyat * ($oran); } } } $satış_fiyatını iade et; } add_filter('yith_ywrbp_regular_price', 'woocs_yith_ywrbp_regular_price', 10, 2); function woocs_yith_ywrbp_regular_price($regular_price, $product = NULL) { if (class_exists('WOOCS')) { global $WOOCS; if ($WOOCS->is_multiple_allowed) { $carrrent = $WOOCS->current_currency; if ($carrrent != $WOOCS->default_currency) { $currencies = $WOOCS->get_currencies(); $oran = $para birimleri[$carrrent]['oran']; $normal_fiyat = $normal_fiyat * ($oran); } } } $normal_fiyat döndür; } //ywcrbp_product_replace_roleprices add_filter('ywcrbp_product_replace_roleprices', 'woocs_ywcrbp_product_replace_roleprices', 9999, 4); function woocs_ywcrbp_product_replace_roleprice($role_price, $user_role, $price, $product) { if (class_exists('WOOCS')) { global $WOOCS; if ($WOOCS->is_multiple_allowed) { $carrrent = $WOOCS->current_currency; if ($carrrent != $WOOCS->default_currency) { $currencies = $WOOCS->get_currencies(); $oran = $para birimleri[$carrrent]['oran']; $rol_fiyatı = $rol_fiyatı * ($oran); } } } $rol_fiyatını döndür; } //yith_wcrbp_get_role_based_price CART FIX add_filter('yith_wcrbp_get_role_based_price', 'woocs_yith_wcrbp_get_role_based_price', 10, 2); function woocs_yith_wcrbp_get_role_based_price($regular_price, $product) { if (class_exists('WOOCS')) { global $WOOCS; if ($WOOCS->is_multiple_allowed) { $carrrent = $WOOCS->current_currency; if ($carrrent != $WOOCS->default_currency AND ( is_cart() VEYA is_checkout())) { $currencies = $WOOCS->get_currencies(); $oran = $para birimleri[$carrrent]['oran']; $normal_fiyat = $normal_fiyat / ($oran); } } } $normal_fiyat döndür; }