✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server366.web-hosting.com ​🇻​♯➤ 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 67.223.118.204 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.243
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/builxejc/public_html/wp-content/plugins/woocommerce/includes//class-wc-order-refund.php
<?php
/**
 * Order refund. Refunds are based on orders (essentially negative orders) and
 * contain much of the same data.
 *
 * @version 3.0.0
 * @package WooCommerce\Classes
 */

use Automattic\WooCommerce\Enums\OrderStatus;

defined( 'ABSPATH' ) || exit;

/**
 * Order refund class.
 */
class WC_Order_Refund extends WC_Abstract_Order {

	/**
	 * Which data store to load.
	 *
	 * @var string
	 */
	protected $data_store_name = 'order-refund';

	/**
	 * This is the name of this object type.
	 *
	 * @var string
	 */
	protected $object_type = 'order_refund';

	/**
	 * Stores product data.
	 *
	 * @var array
	 */
	protected $extra_data = array(
		'amount'           => '',
		'reason'           => '',
		'refunded_by'      => 0,
		'refunded_payment' => false,
	);

	/**
	 * List of properties that were earlier managed by data store. However, since DataStore is a not a stored entity in itself, they used to store data in metadata of the data object.
	 * With custom tables, some of these are moved from metadata to their own columns, but existing code will still try to add them to metadata. This array is used to keep track of such properties.
	 *
	 * Only reason to add a property here is that you are moving properties from DataStore instance to data object. Otherwise, if you are adding a new property, consider adding it to $data array instead.
	 *
	 * @var array
	 */
	protected $legacy_datastore_props = array(
		'_refund_amount',
		'_refund_reason',
		'_refunded_by',
		'_refunded_payment',
	);


	/**
	 * Get internal type (post type.)
	 *
	 * @return string
	 */
	public function get_type() {
		return 'shop_order_refund';
	}

	/**
	 * Get status - always completed for refunds.
	 *
	 * @param  string $context What the value is for. Valid values are view and edit.
	 * @return string
	 */
	public function get_status( $context = 'view' ) {
		return OrderStatus::COMPLETED;
	}

	/**
	 * Get a title for the new post type.
	 */
	public function get_post_title() {
		// @codingStandardsIgnoreStart
		return sprintf( __( 'Refund &ndash; %s', 'woocommerce' ), (new DateTime('now'))->format( _x( 'M d, Y @ h:i A', 'Order date parsed by DateTime::format', 'woocommerce' ) ) );
		// @codingStandardsIgnoreEnd
	}

	/**
	 * Get refunded amount.
	 *
	 * @param  string $context What the value is for. Valid values are view and edit.
	 * @return int|float
	 */
	public function get_amount( $context = 'view' ) {
		return $this->get_prop( 'amount', $context );
	}

	/**
	 * Get refund reason.
	 *
	 * @since 2.2
	 * @param  string $context What the value is for. Valid values are view and edit.
	 * @return string
	 */
	public function get_reason( $context = 'view' ) {
		return $this->get_prop( 'reason', $context );
	}

	/**
	 * Get ID of user who did the refund.
	 *
	 * @since 3.0
	 * @param  string $context What the value is for. Valid values are view and edit.
	 * @return int
	 */
	public function get_refunded_by( $context = 'view' ) {
		return $this->get_prop( 'refunded_by', $context );
	}

	/**
	 * Return if the payment was refunded via API.
	 *
	 * @since  3.3
	 * @param  string $context What the value is for. Valid values are view and edit.
	 * @return bool
	 */
	public function get_refunded_payment( $context = 'view' ) {
		return $this->get_prop( 'refunded_payment', $context );
	}

	/**
	 * Get formatted refunded amount.
	 *
	 * @since 2.4
	 * @return string
	 */
	public function get_formatted_refund_amount() {
		return apply_filters( 'woocommerce_formatted_refund_amount', wc_price( $this->get_amount(), array( 'currency' => $this->get_currency() ) ), $this );
	}

	/**
	 * Set refunded amount.
	 *
	 * @param string $value Value to set.
	 * @throws WC_Data_Exception Exception if the amount is invalid.
	 */
	public function set_amount( $value ) {
		$this->set_prop( 'amount', wc_format_decimal( $value ) );
	}

	/**
	 * Set refund reason.
	 *
	 * @param string $value Value to set.
	 * @throws WC_Data_Exception Exception if the amount is invalid.
	 */
	public function set_reason( $value ) {
		$this->set_prop( 'reason', $value );
	}

	/**
	 * Set refunded by.
	 *
	 * @param int $value Value to set.
	 * @throws WC_Data_Exception Exception if the amount is invalid.
	 */
	public function set_refunded_by( $value ) {
		$this->set_prop( 'refunded_by', absint( $value ) );
	}

	/**
	 * Set if the payment was refunded via API.
	 *
	 * @since 3.3
	 * @param bool $value Value to set.
	 */
	public function set_refunded_payment( $value ) {
		$this->set_prop( 'refunded_payment', (bool) $value );
	}

	/**
	 * Magic __get method for backwards compatibility.
	 *
	 * @param string $key Value to get.
	 * @return mixed
	 */
	public function __get( $key ) {
		wc_doing_it_wrong( $key, 'Refund properties should not be accessed directly.', '3.0' );
		/**
		 * Maps legacy vars to new getters.
		 */
		if ( 'reason' === $key ) {
			return $this->get_reason();
		} elseif ( 'refund_amount' === $key ) {
			return $this->get_amount();
		}
		return parent::__get( $key );
	}

	/**
	 * Gets an refund from the database.
	 *
	 * @deprecated 3.0
	 * @param int $id (default: 0).
	 * @return bool
	 */
	public function get_refund( $id = 0 ) {
		wc_deprecated_function( 'get_refund', '3.0', 'read' );

		if ( ! $id ) {
			return false;
		}

		$result = wc_get_order( $id );

		if ( $result ) {
			$this->populate( $result );
			return true;
		}

		return false;
	}

	/**
	 * Get refund amount.
	 *
	 * @deprecated 3.0
	 * @return int|float
	 */
	public function get_refund_amount() {
		wc_deprecated_function( 'get_refund_amount', '3.0', 'get_amount' );
		return $this->get_amount();
	}

	/**
	 * Get refund reason.
	 *
	 * @deprecated 3.0
	 * @return string
	 */
	public function get_refund_reason() {
		wc_deprecated_function( 'get_refund_reason', '3.0', 'get_reason' );
		return $this->get_reason();
	}

	/**
	 * Indicates if the current order has an associated Cost of Goods Sold value.
	 * For refunds the cost will be sum of the cost of the refunded items.
	 *
	 * @since 9.9.0
	 *
	 * @return bool True if this order has an associated Cost of Goods Sold value.
	 */
	public function has_cogs() {
		return true;
	}
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
abstracts
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
admin
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
blocks
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
cli
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
customizer
--
16 Jun 2026 10.17 AM
builxejc / builxejc
0755
data-stores
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
emails
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
export
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
gateways
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
import
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
integrations
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
interfaces
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
legacy
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
libraries
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
log-handlers
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
payment-tokens
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
product-usage
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
queue
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
react-admin
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
rest-api
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
shipping
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
shortcodes
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
theme-support
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
tracks
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
traits
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
walkers
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
wccom-site
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
widgets
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
class-wc-ajax.php
131.473 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-auth.php
12.69 KB
30 Jul 2024 7.31 PM
builxejc / builxejc
0644
class-wc-autoloader.php
5.268 KB
6 Oct 2025 5.56 PM
builxejc / builxejc
0644
class-wc-background-emailer.php
4.677 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-background-updater.php
3.452 KB
20 Aug 2020 11.18 PM
builxejc / builxejc
0644
class-wc-brands-brand-settings-manager.php
1.783 KB
23 Sep 2024 8.44 PM
builxejc / builxejc
0644
class-wc-brands-coupons.php
6.894 KB
21 Jan 2025 6.53 PM
builxejc / builxejc
0644
class-wc-brands.php
34.8 KB
19 Jan 2026 2.46 PM
builxejc / builxejc
0644
class-wc-breadcrumb.php
10.41 KB
23 Feb 2026 5.58 PM
builxejc / builxejc
0644
class-wc-cache-helper.php
12.792 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-cart-fees.php
3.367 KB
26 Sep 2023 9.42 PM
builxejc / builxejc
0644
class-wc-cart-session.php
25.366 KB
30 Mar 2026 5.12 PM
builxejc / builxejc
0644
class-wc-cart-totals.php
28.479 KB
29 Jul 2025 12.34 PM
builxejc / builxejc
0644
class-wc-cart.php
75.572 KB
30 Mar 2026 5.12 PM
builxejc / builxejc
0644
class-wc-checkout.php
50.352 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-cli.php
3.339 KB
1 Sep 2025 11.44 PM
builxejc / builxejc
0644
class-wc-comments.php
23.077 KB
23 Feb 2026 5.58 PM
builxejc / builxejc
0644
class-wc-countries.php
51.687 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-coupon.php
44.637 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-customer-download-log.php
3.371 KB
20 Aug 2020 11.18 PM
builxejc / builxejc
0644
class-wc-customer-download.php
10.339 KB
30 Jul 2024 7.31 PM
builxejc / builxejc
0644
class-wc-customer.php
33.277 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-data-exception.php
1.29 KB
23 May 2018 7.30 PM
builxejc / builxejc
0644
class-wc-data-store.php
6.594 KB
19 Oct 2022 12.34 AM
builxejc / builxejc
0644
class-wc-datetime.php
2.256 KB
20 Apr 2022 6.50 AM
builxejc / builxejc
0644
class-wc-deprecated-action-hooks.php
6.588 KB
27 Feb 2024 6.59 PM
builxejc / builxejc
0644
class-wc-deprecated-filter-hooks.php
7.342 KB
30 Mar 2026 5.12 PM
builxejc / builxejc
0644
class-wc-discounts.php
36.644 KB
29 Jul 2025 12.34 PM
builxejc / builxejc
0644
class-wc-download-handler.php
28.372 KB
18 Dec 2024 10.19 PM
builxejc / builxejc
0644
class-wc-emails.php
39.638 KB
25 May 2026 2.01 PM
builxejc / builxejc
0644
class-wc-embed.php
4.24 KB
21 Jan 2025 6.53 PM
builxejc / builxejc
0644
class-wc-form-handler.php
48.171 KB
9 Mar 2026 4.07 PM
builxejc / builxejc
0644
class-wc-frontend-scripts.php
34.438 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-geo-ip.php
30.429 KB
6 Oct 2025 5.56 PM
builxejc / builxejc
0644
class-wc-geolite-integration.php
1.988 KB
16 Jan 2020 6.10 AM
builxejc / builxejc
0644
class-wc-geolocation.php
11.464 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-https.php
4.335 KB
20 Jun 2023 11.45 PM
builxejc / builxejc
0644
class-wc-install.php
116.715 KB
25 May 2026 2.01 PM
builxejc / builxejc
0644
class-wc-integrations.php
1.277 KB
20 Aug 2020 11.18 PM
builxejc / builxejc
0644
class-wc-log-levels.php
3.898 KB
30 Jan 2024 11.24 PM
builxejc / builxejc
0644
class-wc-logger.php
9.413 KB
23 Feb 2026 5.58 PM
builxejc / builxejc
0644
class-wc-meta-data.php
2.207 KB
20 Apr 2022 6.50 AM
builxejc / builxejc
0644
class-wc-order-factory.php
8.979 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-order-item-coupon.php
4.077 KB
22 Dec 2021 12.24 AM
builxejc / builxejc
0644
class-wc-order-item-fee.php
9.988 KB
19 Jan 2026 2.46 PM
builxejc / builxejc
0644
class-wc-order-item-meta.php
5.803 KB
22 Dec 2021 12.24 AM
builxejc / builxejc
0644
class-wc-order-item-product.php
17.606 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-order-item-shipping.php
9.585 KB
19 Jan 2026 2.46 PM
builxejc / builxejc
0644
class-wc-order-item-tax.php
6.488 KB
22 Dec 2021 12.24 AM
builxejc / builxejc
0644
class-wc-order-item.php
21.394 KB
19 Jan 2026 2.46 PM
builxejc / builxejc
0644
class-wc-order-query.php
2.552 KB
23 Feb 2026 5.58 PM
builxejc / builxejc
0644
class-wc-order-refund.php
5.991 KB
12 May 2025 9.07 PM
builxejc / builxejc
0644
class-wc-order.php
78.376 KB
11 May 2026 5.17 PM
builxejc / builxejc
0644
class-wc-payment-gateways.php
14.373 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-payment-tokens.php
6.24 KB
23 Nov 2022 5.58 AM
builxejc / builxejc
0644
class-wc-post-data.php
39.094 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-post-types.php
33.158 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-privacy-background-process.php
1.79 KB
3 Mar 2025 10.28 PM
builxejc / builxejc
0644
class-wc-privacy-erasers.php
13.614 KB
1 Sep 2025 11.44 PM
builxejc / builxejc
0644
class-wc-privacy-exporters.php
14.691 KB
28 Jul 2021 4.11 AM
builxejc / builxejc
0644
class-wc-privacy.php
17.216 KB
23 Jun 2025 7.46 PM
builxejc / builxejc
0644
class-wc-product-attribute.php
7.868 KB
23 Feb 2026 5.58 PM
builxejc / builxejc
0644
class-wc-product-download.php
13.178 KB
23 Feb 2026 5.58 PM
builxejc / builxejc
0644
class-wc-product-external.php
4.984 KB
3 Mar 2025 10.28 PM
builxejc / builxejc
0644
class-wc-product-factory.php
4.588 KB
30 Mar 2026 5.12 PM
builxejc / builxejc
0644
class-wc-product-grouped.php
6.811 KB
30 Mar 2026 5.12 PM
builxejc / builxejc
0644
class-wc-product-query.php
2.273 KB
23 Feb 2026 5.58 PM
builxejc / builxejc
0644
class-wc-product-simple.php
2.7 KB
29 Jul 2025 12.34 PM
builxejc / builxejc
0644
class-wc-product-variable.php
23.764 KB
30 Mar 2026 5.12 PM
builxejc / builxejc
0644
class-wc-product-variation.php
20.177 KB
12 May 2025 9.07 PM
builxejc / builxejc
0644
class-wc-query.php
37.013 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-rate-limiter.php
4.004 KB
1 Dec 2021 4.23 AM
builxejc / builxejc
0644
class-wc-regenerate-images-request.php
7.737 KB
25 Jan 2023 3.19 AM
builxejc / builxejc
0644
class-wc-regenerate-images.php
15.436 KB
25 Jun 2024 9.17 PM
builxejc / builxejc
0644
class-wc-register-wp-admin-settings.php
5.05 KB
22 Jun 2021 3.24 PM
builxejc / builxejc
0644
class-wc-rest-authentication.php
21.551 KB
25 Jun 2024 9.17 PM
builxejc / builxejc
0644
class-wc-rest-exception.php
0.27 KB
23 Sep 2020 1.16 AM
builxejc / builxejc
0644
class-wc-session-handler.php
24.572 KB
30 Mar 2026 5.12 PM
builxejc / builxejc
0644
class-wc-shipping-rate.php
9.342 KB
23 Jun 2025 7.46 PM
builxejc / builxejc
0644
class-wc-shipping-zone.php
13.078 KB
23 Sep 2020 1.16 AM
builxejc / builxejc
0644
class-wc-shipping-zones.php
4.995 KB
24 Nov 2025 11.10 PM
builxejc / builxejc
0644
class-wc-shipping.php
13.032 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-shortcodes.php
18.822 KB
21 Jan 2025 6.53 PM
builxejc / builxejc
0644
class-wc-structured-data.php
24.783 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-tax.php
39.871 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-template-loader.php
20.421 KB
12 Nov 2025 6.35 PM
builxejc / builxejc
0644
class-wc-tracker.php
51.495 KB
6 Oct 2025 5.56 PM
builxejc / builxejc
0644
class-wc-validation.php
5.79 KB
28 May 2024 2.28 PM
builxejc / builxejc
0644
class-wc-webhook.php
30.174 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-woocommerce.php
63.367 KB
27 May 2026 9.54 PM
builxejc / builxejc
0644
wc-account-functions.php
14.146 KB
24 Nov 2025 11.10 PM
builxejc / builxejc
0644
wc-attribute-functions.php
21.913 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
wc-brands-functions.php
4.17 KB
23 Sep 2024 8.44 PM
builxejc / builxejc
0644
wc-cart-functions.php
20.809 KB
19 Jan 2026 2.46 PM
builxejc / builxejc
0644
wc-conditional-functions.php
15.529 KB
29 Jul 2025 12.34 PM
builxejc / builxejc
0644
wc-core-functions.php
79.001 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
wc-coupon-functions.php
5.564 KB
19 Jan 2026 2.46 PM
builxejc / builxejc
0644
wc-deprecated-functions.php
39.776 KB
23 Feb 2026 5.58 PM
builxejc / builxejc
0644
wc-formatting-functions.php
49.896 KB
24 Nov 2025 11.10 PM
builxejc / builxejc
0644
wc-interactivity-api-functions.php
2.428 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
wc-notice-functions.php
8.492 KB
19 Jan 2026 2.46 PM
builxejc / builxejc
0644
wc-order-functions.php
43.989 KB
11 May 2026 5.17 PM
builxejc / builxejc
0644
wc-order-item-functions.php
5.032 KB
25 Jan 2023 3.19 AM
builxejc / builxejc
0644
wc-order-step-logger-functions.php
5.971 KB
23 Feb 2026 5.58 PM
builxejc / builxejc
0644
wc-page-functions.php
9.986 KB
11 May 2026 5.17 PM
builxejc / builxejc
0644
wc-product-functions.php
69.184 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
wc-rest-functions.php
13.934 KB
24 Nov 2025 11.10 PM
builxejc / builxejc
0644
wc-stock-functions.php
17.433 KB
24 Nov 2025 11.10 PM
builxejc / builxejc
0644
wc-template-functions.php
142.513 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
wc-template-hooks.php
12.843 KB
1 Sep 2025 11.44 PM
builxejc / builxejc
0644
wc-term-functions.php
24.628 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
wc-update-functions.php
107.048 KB
25 May 2026 2.01 PM
builxejc / builxejc
0644
wc-user-functions.php
36.727 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
wc-webhook-functions.php
5.912 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
wc-widget-functions.php
2.015 KB
20 Aug 2020 11.18 PM
builxejc / builxejc
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF