• Resolved gfrino

    (@gfrino)


    Not all orders get printed, some aren’t, looking at server log I found the following:

    2022-05-17 16:32:48.814318 [NOTICE] [7328] [T0] [213.3.34.103:16605:HTTP2-67#Jelastic] [STDERR] PHP Fatal error: Uncaught TypeError: number_format(): Argument #1 ($num) must be of type float, string given in /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php:103 Stack trace: #0 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php(103): number_format() #1 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.php(56): star_cloudprnt_format_currency() #2 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.php(379): star_cloudprnt_print_items() #3 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php(192): star_cloudprnt_print_order_summary() #4 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php(255): star_cloudprnt_trigger_print() #5 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(307): star_cloudprnt_reprint_button_callback() #6 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #7 /var/www/webroot/ROOT/wp-includes/plugin.php(474): WP_Hook->do_action() #8 /var/www/webroot/ROOT/wp-admin/admin-ajax.php(187): do_action() #9 {main} thrown in /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php on line 103 2022-05-17 16:32:48.814318 [NOTICE] [7328] [T0] [213.3.34.103:16605:HTTP2-67#Jelastic] [STDERR] PHP Fatal error: Uncaught TypeError: number_format(): Argument #1 ($num) must be of type float, string given in /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php:103 Stack trace: #0 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php(103): number_format() #1 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.php(56): star_cloudprnt_format_currency() #2 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.php(379): star_cloudprnt_print_items() #3 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php(192): star_cloudprnt_print_order_summary() #4 /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php(255): star_cloudprnt_trigger_print() #5 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(307): star_cloudprnt_reprint_button_callback() #6 /var/www/webroot/ROOT/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #7 /var/www/webroot/ROOT/wp-includes/plugin.php(474): WP_Hook->do_action() #8 /var/www/webroot/ROOT/wp-admin/admin-ajax.php(187): do_action() #9 {main} thrown in /var/www/webroot/ROOT/wp-content/plugins/star-cloudprnt-for-woocommerce/order-handler.inc.php on line 103 2022-05-17 16:32:49.323994 [NOTICE] [7328] [T0] [192.0.99.146:14520#Jelastic] [STDERR] Connection refused 2022-05-17 16:32:49.323994 [NOTICE] [7328] [T0] [192.0.99.146:14520#Jelastic] [STDERR] Connection refused 2022-05-17 16:32:53.398476 [NOTICE] [7328] [T0] [89.217.149.18:55078-H3:0BCB9EA133CB9D18-320#Jelastic] [STDERR] Connection refused 2022-05-17 16:32:53.398476 [NOTICE] [7328] [T0] [89.217.149.18:55078-H3:0BCB9EA133CB9D18-320#Jelastic] [STDERR] Connection refused 2022-05-17 16:32:54.123569 [NOTICE] [7328] [T0] [83.166.147.36:60736#Jelastic] [STDERR] Connection refused 2022-05-17 16:32:54.123569 [NOTICE] [7328] [T0] [83.166.147.36:60736#Jelastic] [STDERR] Connection refused 2022-05-17 16:32:58.360525 [NOTICE] [7328] [T0] [213.3.34.103:16605:HTTP2-69#Jelastic] [STDERR] Connection refused 2022-05-17 16:32:58.360525 [NOTICE] [7328] [T0] [213.3.34.103:16605:HTTP2-69#Jelastic] [STDERR] Connection refused 2022-05-17 16:33:08.403000 [NOTICE] [7328] [T0] [89.217.149.18:55078-H3:0BCB9EA133CB9D18-324#Jelastic] [STDERR] Connection refused 2022-05-17 16:33:08.403000 [NOTICE] [7328] [T0] [89.217.149.18:55078-H3:0BCB9EA133CB9D18-324#Jelastic] [STDERR] Connection refused

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter gfrino

    (@gfrino)

    I managed to fix the problem by adding the following code:

    function name star_cloudprnt_format_currency()

    function star_cloudprnt_format_currency($value)
    	{	
    		 
    		if(!empty($value)){
    			return star_cloudprnt_get_codepage_currency_symbol() . number_format($value, 2, '.', '');
    		}
    		
    	}

    I guess would be good if the developer of the plugin adds the above

Viewing 1 replies (of 1 total)
  • The topic ‘Some orders aren’t printing’ is closed to new replies.