Translation method

WCMp Vendor Vacation

Translation method Resolved

Viewing 6 reply threads
  • Author
    • #111724
      Naoya Ishikawa

      The message “Shop is closed now. We will Reopen on 20th Dec 2020” that appears during the vendor’s vacation does not seem to support translation.
      Is there a way to replace the letters?

    • #111851

      Can you please share a screenshot of vendor page and also the product page with the text. So we will able to help you out accordingly.


    • #112082
      Naoya Ishikawa
      This reply has been marked as private.
    • #112084
      Naoya Ishikawa
      This reply has been marked as private.
    • #112106

      We have found a translation issue with this text.We will fix this on our next update.
      As a temporary solution please add below code
      Please add this code in the function.php of the current active theme :

      add_action('init', 'wcmp_vacation_shop_reopen_text');
      function wcmp_vacation_shop_reopen_text(){
      	global $WCMP_Vendor_Vacation;
      	remove_action('after_wcmp_vendor_description', array($WCMP_Vendor_Vacation->frontend, 'display_shop_reopen_date'));
      	add_action('after_wcmp_vendor_description',  'display_shop_reopen_date');
      function display_shop_reopen_date($vendor_id) {
          $vendor_vacation_set_up = get_user_meta($vendor_id, '_vacation_include_dates', true);
          $holidays = isset($vendor_vacation_set_up['include_dates_array']) ? $vendor_vacation_set_up['include_dates_array'] : false;
          if (is_array($holidays) && count($holidays) > 0 && isset($vendor_vacation_set_up['avoid_purchase'])) {
              $today = date('j/n/Y');
              if (in_array($today, $holidays)) {
                  $available = true;
                  $day = 1;
                  while($available) {
                      $today = date('Y-m-d');
                      $tommorow = date('j/n/Y', strtotime($today .' +'.$day.' day'));
                      if(in_array($tommorow, $holidays)) {
                      else {
                          $available = false;
                  if(!$available) {
                      $date = str_replace('/', '-', $tommorow);
                      $Reopen = date('Y-m-d', strtotime($date));
                      $shop_close_text = "Shop is closed now. We will Reopen on "; // change your text from here.
                      echo "<div class='description_data'><p>". $shop_close_text . date('jS M Y', strtotime($Reopen))."</p></div>";

      and change the text on the $shop_close_text variable.

    • #115602
      Naoya Ishikawa

      I was able to translate it safely.
      Thank you!

    • #115695

      Thank you, based on your confirmation we are marking this thread closed.

Viewing 6 reply threads

The topic ‘Translation method’ is closed to new replies.

Buy all Marketplace addons together, check out our Bundle

Buy at Slashed Price