Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
ThemeUpgrader.php 0000644 00000004004 15073234776 0010025 0 ustar 00 true,
);
$parsed_args = wp_parse_args( $args, $defaults );
$this->init();
$this->install_strings();
add_filter( 'upgrader_source_selection', array( $this, 'check_package' ) );
add_filter( 'upgrader_post_install', array( $this, 'check_parent_theme_filter' ), 10, 3 );
if ( $parsed_args['clear_update_cache'] ) {
// Clear cache so wp_update_themes() knows about the new theme.
add_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9, 0 );
}
$result = $this->run(
array(
'package' => $package,
'destination' => get_theme_root(),
'clear_destination' => false, // Do not overwrite files.
'clear_working' => true,
'hook_extra' => array(
'type' => 'theme',
'action' => 'install',
),
)
);
remove_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9 );
remove_filter( 'upgrader_source_selection', array( $this, 'check_package' ) );
remove_filter( 'upgrader_post_install', array( $this, 'check_parent_theme_filter' ) );
if ( $result && ! is_wp_error( $result ) ) {
// Refresh the Theme Update information.
wp_clean_themes_cache( $parsed_args['clear_update_cache'] );
}
return $result;
}
}
ThemeUpgraderSkin.php 0000644 00000001446 15073234776 0010661 0 ustar 00 get_quantity( 'edit' );
$order_items = $this->get_item_count();
if ( 0 === $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 WC is currently not tax enabled, but it was before (or vice versa), would this work correctly?
*
* @param WC_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 ( 0 === $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 woocommerce code in includes/admin/meta-boxes/views/html-order-item.php.
*
* @param WC_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' ) );
}
}
OrderRefund.php 0000644 00000004034 15073234776 0007513 0 ustar 00 customer_id ) ) {
$parent_order = \wc_get_order( $this->get_parent_id() );
if ( ! $parent_order ) {
$this->customer_id = false;
}
$this->customer_id = CustomersDataStore::get_or_create_customer_from_order( $parent_order );
}
return $this->customer_id;
}
/**
* Returns null since refunds should not be counted towards returning customer counts.
*
* @return null
*/
public function is_returning_customer() {
return null;
}
}
Order.php 0000644 00000007123 15073234776 0006351 0 ustar 00 $this->get_id(),
),
$this->data,
array(
'number' => $this->get_order_number(),
'meta_data' => $this->get_meta_data(),
)
);
}
/**
* Get order line item data by type.
*
* @param string $type Order line item type.
* @return array|bool Array of line items on success, boolean false on failure.
*/
public function get_line_item_data( $type ) {
$type_to_items = array(
'line_items' => 'line_item',
'tax_lines' => 'tax',
'shipping_lines' => 'shipping',
'fee_lines' => 'fee',
'coupon_lines' => 'coupon',
);
if ( isset( $type_to_items[ $type ] ) ) {
return $this->get_items( $type_to_items[ $type ] );
}
return false;
}
/**
* Add filter(s) required to hook this class to substitute WC_Order.
*/
public static function add_filters() {
add_filter( 'woocommerce_order_class', array( __CLASS__, 'order_class_name' ), 10, 3 );
}
/**
* Filter function to swap class WC_Order for this one in cases when it's suitable.
*
* @param string $classname Name of the class to be created.
* @param string $order_type Type of order object to be created.
* @param number $order_id Order id to create.
*
* @return string
*/
public static function order_class_name( $classname, $order_type, $order_id ) {
// @todo - Only substitute class when necessary (during sync).
if ( 'WC_Order' === $classname ) {
return '\Automattic\WooCommerce\Admin\Overrides\Order';
} else {
return $classname;
}
}
/**
* Get the customer ID used for reports in the customer lookup table.
*
* @return int
*/
public function get_report_customer_id() {
if ( is_null( $this->customer_id ) ) {
$this->customer_id = CustomersDataStore::get_or_create_customer_from_order( $this );
}
return $this->customer_id;
}
/**
* Returns true if the customer has made an earlier order.
*
* @return bool
*/
public function is_returning_customer() {
return OrdersStatsDataStore::is_returning_customer( $this, $this->get_report_customer_id() );
}
/**
* Get the customer's first name.
*/
public function get_customer_first_name() {
if ( $this->get_user_id() ) {
return get_user_meta( $this->get_user_id(), 'first_name', true );
}
if ( '' !== $this->get_billing_first_name( 'edit' ) ) {
return $this->get_billing_first_name( 'edit' );
} else {
return $this->get_shipping_first_name( 'edit' );
}
}
/**
* Get the customer's last name.
*/
public function get_customer_last_name() {
if ( $this->get_user_id() ) {
return get_user_meta( $this->get_user_id(), 'last_name', true );
}
if ( '' !== $this->get_billing_last_name( 'edit' ) ) {
return $this->get_billing_last_name( 'edit' );
} else {
return $this->get_shipping_last_name( 'edit' );
}
}
}