REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 2.19 KB
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/woocommerce/src/Internal/Orders/IppFunctions.php
Text
Base64
<?php namespace Automattic\WooCommerce\Internal\Orders; use WC_Order; use WC_Gateway_COD; /** * Class with methods for handling order In-Person Payments. */ class IppFunctions { /** * Returns if order is eligible to accept In-Person Payments. * * @param WC_Order $order order that the conditions are checked for. * * @return bool true if order is eligible, false otherwise */ public static function is_order_in_person_payment_eligible( WC_Order $order ): bool { $has_status = in_array( $order->get_status(), array( 'pending', 'on-hold', 'processing' ), true ); $has_payment_method = in_array( $order->get_payment_method(), array( WC_Gateway_COD::ID, 'woocommerce_payments', 'none' ), true ); $order_is_not_paid = null === $order->get_date_paid(); $order_is_not_refunded = empty( $order->get_refunds() ); $order_has_no_subscription_products = true; foreach ( $order->get_items() as $item ) { $product = $item->get_product(); if ( is_object( $product ) && $product->is_type( 'subscription' ) ) { $order_has_no_subscription_products = false; break; } } return $has_status && $has_payment_method && $order_is_not_paid && $order_is_not_refunded && $order_has_no_subscription_products; } /** * Returns if store is eligible to accept In-Person Payments. * * @return bool true if store is eligible, false otherwise */ public static function is_store_in_person_payment_eligible(): bool { $is_store_usa_based = self::has_store_specified_country_currency( 'US', 'USD' ); $is_store_canada_based = self::has_store_specified_country_currency( 'CA', 'CAD' ); return $is_store_usa_based || $is_store_canada_based; } /** * Checks if the store has specified country location and currency used. * * @param string $country country to compare store's country with. * @param string $currency currency to compare store's currency with. * * @return bool true if specified country and currency match the store's ones. false otherwise */ public static function has_store_specified_country_currency( string $country, string $currency ): bool { return ( WC()->countries->get_base_country() === $country && get_woocommerce_currency() === $currency ); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 12
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
CardIcons
DIR
-
drwxr-xr-x
2026-05-29 02:43:21
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CouponsController.php
3.57 KB
lrw-r--r--
2025-11-24 23:10:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
IppFunctions.php
2.19 KB
lrw-r--r--
2025-01-21 18:53:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MobileMessagingHandler.php
5.50 KB
lrw-r--r--
2024-04-10 16:54:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
OrderActionsRestController.php
24.32 KB
lrw-r--r--
2026-03-30 17:12:24
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
OrderAttributionBlocksController.php
4.37 KB
lrw-r--r--
2025-03-03 22:28:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
OrderAttributionController.php
16.55 KB
lrw-r--r--
2026-01-19 14:46:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
OrderNoteGroup.php
1.58 KB
lrw-r--r--
2026-03-30 17:12:24
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
OrderStatusRestController.php
2.55 KB
lrw-r--r--
2026-01-19 14:46:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PaymentInfo.php
4.67 KB
lrw-r--r--
2025-09-01 23:44:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PointOfSaleEmailHandler.php
1.80 KB
lrw-r--r--
2026-03-30 17:12:24
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PointOfSaleOrderUtil.php
1.46 KB
lrw-r--r--
2026-03-30 17:12:24
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TaxesController.php
1.80 KB
lrw-r--r--
2022-08-24 02:07:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).