Plugin Directory

Changeset 3136496


Ignore:
Timestamp:
08/16/2024 09:40:45 AM (20 months ago)
Author:
rednumber
Message:

update

Location:
pdf-for-woocommerce/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pdf-for-woocommerce/trunk/pdf-for-woocommerce.php

    r3135227 r3136496  
    66 * Text Domain: pdf-for-woocommerce
    77 * Domain Path: /languages
    8  * Version: 2.3.4
     8 * Version: 2.3.5
    99 * Requires PHP: 5.6
    1010 * Author: add-ons.org
  • pdf-for-woocommerce/trunk/readme.txt

    r3135227 r3136496  
    44Requires at least: 2.0
    55Tested up to: 6.6.1
    6 Stable tag: 2.3.4
     6Stable tag: 2.3.5
    77Requires PHP: 5.6
    88License: GPLv2 or later
     
    7272
    7373== Changelog ==
     74= 2.3.5 =
     75- Added: shortcode total Price in Words ( Change format)
     76
    7477= 2.3.4 =
    7578- Added: shortcode total Price in Words
  • pdf-for-woocommerce/trunk/woocommerce/shortcodes.php

    r3135227 r3136496  
    470470    function convert_number_to_words($number) {
    471471
    472         $hyphen      = '-';
     472        $hyphen      = ' ';
    473473        $conjunction = ' and ';
    474474        $separator   = ', ';
     
    567567                break;
    568568        }
    569    
    570569        if (null !== $fraction && is_numeric($fraction)) {
    571             $string .= $decimal;
    572             $words = array();
    573             foreach (str_split((string) $fraction) as $number) {
    574                 $words[] = $dictionary[$number];
     570            if($fraction != 0){
     571                $string .= $decimal;
     572                $words = array();
     573                foreach (str_split((string) $fraction) as $number) {
     574                    $words[] = $dictionary[$number];
     575                }
     576                $string .= implode(' ', $words);
    575577            }
    576             $string .= implode(' ', $words);
     578           
    577579        }
    578580   
Note: See TracChangeset for help on using the changeset viewer.