WOOCS - WooCommerce Para Birimi Değiştirici


WooCommerce tarafından WooCommerce Abonelikleri

Fişe takmakhttps://woocommerce.com/products/woocommerce-subscriptions/

  • Dosyada functions.php mevcut wp temanızın bir sonraki kodunu ekleyin:
    add_filter('woocommerce_subscription_price_string_details', 'woocs_woocommerce_subscription_price_string_details', 100, 2); function woocs_woocommerce_subscription_price_string_details($arg, $_this) { if (class_exists('WOOCS')) { global $WOOCS; $order_currency = get_post_meta($_this->get_id(), '_order_currency', true); if ($order_currency AND $WOOCS->current_currency != $order_currency) { $WOOCS->set_currency($order_currency); } } $arg döndür; }
  • Dosyada \wp-content\plugins\woocommerce-subscriptions\includes\wcs-order-functions.php sonraki kodu ekle:
    if (class_exists('WOOCS')) { global $WOOCS; $order_currency = get_post_meta($order_id, '_order_currency', true); if ($order_currency AND $WOOCS->current_currency != $order_currency) { $WOOCS->set_currency($order_currency); } }

     

  • Sonraki CSS talimatlarını ekleyin:
    .price .subscription-details:nth-child(2) { görüntüleme: yok; }
  • dosyada \wp-content\plugins\woocommerce-subscriptions-master\include\class-wcs-cart-renewal.php  kod ekle:
    if (class_exists('WOOCS')) { global $WOOCS; if ($WOOCS->is_multiple_allowed) { $curr = get_post_meta($subscription->get_id(), '_order_currency', true); $currencies = $WOOCS->get_currencies(); $oran = $para birimleri[$curr]['oran']; $fiyat = $fiyat / ($oran); } }

\wp-content\plugins\woocommerce-subscriptions\includes\class-wc-subscriptions-product.php dosyasına sonraki kodu ekleyin:

if (class_exists('WOOCS') AND $subscription_price) { global $WOOCS; if ($WOOCS->is_multiple_allowed) { $subscription_price = $WOOCS->woocs_exchange_value(floatval($subscription_price)); } }


woocommerce-subscriptions/includes/wcs-order-functions.php dosyasında sonraki kodu yapıştırın:

if(class_exists('WOOCS') AND 'renewal_order' == $type ){ global $WOOCS; $_order_currency = get_post_meta($subscription->get_id(), '_order_currency', true); if($_order_currency){ $WOOCS->set_currency($_order_currency); } }