X7ROOT File Manager
Current Path:
/home/notabjze/caribbeansee.com/wp-content/plugins/woocommerce/includes
home
/
notabjze
/
caribbeansee.com
/
wp-content
/
plugins
/
woocommerce
/
includes
/
ðŸ“
..
ðŸ“
abstracts
ðŸ“
admin
ðŸ“
blocks
📄
class-wc-ajax.php
(114.64 KB)
📄
class-wc-api.php
(4.99 KB)
📄
class-wc-auth.php
(12.69 KB)
📄
class-wc-autoloader.php
(3.13 KB)
📄
class-wc-background-emailer.php
(4.58 KB)
📄
class-wc-background-updater.php
(3.45 KB)
📄
class-wc-breadcrumb.php
(9.49 KB)
📄
class-wc-cache-helper.php
(11.17 KB)
📄
class-wc-cart-fees.php
(3.37 KB)
📄
class-wc-cart-session.php
(17.81 KB)
📄
class-wc-cart-totals.php
(28.25 KB)
📄
class-wc-cart.php
(66.4 KB)
📄
class-wc-checkout.php
(46.93 KB)
📄
class-wc-cli.php
(2.57 KB)
📄
class-wc-comments.php
(15.86 KB)
📄
class-wc-countries.php
(48.92 KB)
📄
class-wc-coupon.php
(37.88 KB)
📄
class-wc-customer-download-log.php
(3.37 KB)
📄
class-wc-customer-download.php
(10.34 KB)
📄
class-wc-customer.php
(29.68 KB)
📄
class-wc-data-exception.php
(1.29 KB)
📄
class-wc-data-store.php
(6.59 KB)
📄
class-wc-datetime.php
(2.26 KB)
📄
class-wc-deprecated-action-hooks.php
(6.59 KB)
📄
class-wc-deprecated-filter-hooks.php
(7.34 KB)
📄
class-wc-discounts.php
(35.04 KB)
📄
class-wc-download-handler.php
(28.38 KB)
📄
class-wc-emails.php
(25.09 KB)
📄
class-wc-embed.php
(4.18 KB)
📄
class-wc-form-handler.php
(44.65 KB)
📄
class-wc-frontend-scripts.php
(27.03 KB)
📄
class-wc-geo-ip.php
(30.41 KB)
📄
class-wc-geolite-integration.php
(1.99 KB)
📄
class-wc-geolocation.php
(10.44 KB)
📄
class-wc-https.php
(4.33 KB)
📄
class-wc-install.php
(100.99 KB)
📄
class-wc-integrations.php
(1.28 KB)
📄
class-wc-log-levels.php
(3.9 KB)
📄
class-wc-logger.php
(9.29 KB)
📄
class-wc-meta-data.php
(2.21 KB)
📄
class-wc-order-factory.php
(8.52 KB)
📄
class-wc-order-item-coupon.php
(4.08 KB)
📄
class-wc-order-item-fee.php
(8.85 KB)
📄
class-wc-order-item-meta.php
(5.8 KB)
📄
class-wc-order-item-product.php
(13.7 KB)
📄
class-wc-order-item-shipping.php
(7.85 KB)
📄
class-wc-order-item-tax.php
(6.49 KB)
📄
class-wc-order-item.php
(11.65 KB)
📄
class-wc-order-query.php
(2.55 KB)
📄
class-wc-order-refund.php
(5.63 KB)
📄
class-wc-order.php
(69.28 KB)
📄
class-wc-payment-gateways.php
(11.36 KB)
📄
class-wc-payment-tokens.php
(6.24 KB)
📄
class-wc-post-data.php
(20.89 KB)
📄
class-wc-post-types.php
(31.84 KB)
📄
class-wc-privacy-background-process.php
(1.67 KB)
📄
class-wc-privacy-erasers.php
(13.61 KB)
📄
class-wc-privacy-exporters.php
(14.69 KB)
📄
class-wc-privacy.php
(15.82 KB)
📄
class-wc-product-attribute.php
(6.97 KB)
📄
class-wc-product-download.php
(12.25 KB)
📄
class-wc-product-external.php
(4.84 KB)
📄
class-wc-product-factory.php
(3.58 KB)
📄
class-wc-product-grouped.php
(5.22 KB)
📄
class-wc-product-query.php
(2.18 KB)
📄
class-wc-product-simple.php
(2.64 KB)
📄
class-wc-product-variable.php
(22.07 KB)
📄
class-wc-product-variation.php
(16.87 KB)
📄
class-wc-query.php
(32.6 KB)
📄
class-wc-rate-limiter.php
(4 KB)
📄
class-wc-regenerate-images-request.php
(7.74 KB)
📄
class-wc-regenerate-images.php
(15.44 KB)
📄
class-wc-register-wp-admin-settings.php
(5.05 KB)
📄
class-wc-rest-authentication.php
(21.55 KB)
📄
class-wc-rest-exception.php
(276 B)
📄
class-wc-session-handler.php
(15.03 KB)
📄
class-wc-shipping-rate.php
(5.51 KB)
📄
class-wc-shipping-zone.php
(13.08 KB)
📄
class-wc-shipping-zones.php
(4.01 KB)
📄
class-wc-shipping.php
(11.57 KB)
📄
class-wc-shortcodes.php
(18.67 KB)
📄
class-wc-structured-data.php
(18.88 KB)
📄
class-wc-tax.php
(37.08 KB)
📄
class-wc-template-loader.php
(21.39 KB)
📄
class-wc-tracker.php
(37.42 KB)
📄
class-wc-validation.php
(5.79 KB)
📄
class-wc-webhook.php
(29.34 KB)
📄
class-woocommerce.php
(45.52 KB)
ðŸ“
cli
ðŸ“
customizer
ðŸ“
data-stores
ðŸ“
emails
ðŸ“
export
ðŸ“
gateways
ðŸ“
import
ðŸ“
integrations
ðŸ“
interfaces
ðŸ“
legacy
ðŸ“
libraries
ðŸ“
log-handlers
ðŸ“
payment-tokens
ðŸ“
product-usage
ðŸ“
queue
ðŸ“
react-admin
ðŸ“
rest-api
ðŸ“
shipping
ðŸ“
shortcodes
ðŸ“
theme-support
ðŸ“
tracks
ðŸ“
traits
ðŸ“
walkers
📄
wc-account-functions.php
(13.23 KB)
📄
wc-attribute-functions.php
(21.12 KB)
📄
wc-cart-functions.php
(19.9 KB)
📄
wc-conditional-functions.php
(13.92 KB)
📄
wc-core-functions.php
(80.68 KB)
📄
wc-coupon-functions.php
(2.75 KB)
📄
wc-deprecated-functions.php
(34.08 KB)
📄
wc-formatting-functions.php
(45.5 KB)
📄
wc-notice-functions.php
(8.02 KB)
📄
wc-order-functions.php
(38.93 KB)
📄
wc-order-item-functions.php
(5.03 KB)
📄
wc-page-functions.php
(8.3 KB)
📄
wc-product-functions.php
(53.13 KB)
📄
wc-rest-functions.php
(12.62 KB)
📄
wc-stock-functions.php
(16.64 KB)
📄
wc-template-functions.php
(123.9 KB)
📄
wc-template-hooks.php
(12.67 KB)
📄
wc-term-functions.php
(20.66 KB)
📄
wc-update-functions.php
(86.64 KB)
📄
wc-user-functions.php
(28.67 KB)
📄
wc-webhook-functions.php
(5.77 KB)
📄
wc-widget-functions.php
(2.01 KB)
ðŸ“
wccom-site
ðŸ“
widgets
Editing: class-wc-validation.php
<?php /** * General user data validation methods * * @package WooCommerce\Classes * @version 2.4.0 */ defined( 'ABSPATH' ) || exit; /** * Validation class. */ class WC_Validation { /** * Validates an email using WordPress native is_email function. * * @param string $email Email address to validate. * @return bool */ public static function is_email( $email ) { return is_email( $email ); } /** * Validates a phone number using a regular expression. * * @param string $phone Phone number to validate. * @return bool */ public static function is_phone( $phone ) { if ( 0 < strlen( trim( preg_replace( '/[\s\#0-9_\-\+\/\(\)\.]/', '', $phone ) ) ) ) { return false; } return true; } /** * Checks for a valid postcode. * * @param string $postcode Postcode to validate. * @param string $country Country to validate the postcode for. * @return bool */ public static function is_postcode( $postcode, $country ) { if ( strlen( trim( preg_replace( '/[\s\-A-Za-z0-9]/', '', $postcode ) ) ) > 0 ) { return false; } switch ( $country ) { case 'AT': case 'BE': case 'CH': case 'HU': case 'NO': $valid = (bool) preg_match( '/^([0-9]{4})$/', $postcode ); break; case 'BA': $valid = (bool) preg_match( '/^([7-8]{1})([0-9]{4})$/', $postcode ); break; case 'BR': $valid = (bool) preg_match( '/^([0-9]{5})([-])?([0-9]{3})$/', $postcode ); break; case 'DE': $valid = (bool) preg_match( '/^([0]{1}[1-9]{1}|[1-9]{1}[0-9]{1})[0-9]{3}$/', $postcode ); break; case 'DK': $valid = (bool) preg_match( '/^(DK-)?([1-24-9]\d{3}|3[0-8]\d{2})$/', $postcode ); break; case 'ES': case 'FI': case 'EE': case 'FR': case 'IT': $valid = (bool) preg_match( '/^([0-9]{5})$/i', $postcode ); break; case 'GB': $valid = self::is_gb_postcode( $postcode ); break; case 'IE': $valid = (bool) preg_match( '/([AC-FHKNPRTV-Y]\d{2}|D6W)[0-9AC-FHKNPRTV-Y]{4}/', wc_normalize_postcode( $postcode ) ); break; case 'IN': $valid = (bool) preg_match( '/^[1-9]{1}[0-9]{2}\s{0,1}[0-9]{3}$/', $postcode ); break; case 'JP': $valid = (bool) preg_match( '/^([0-9]{3})([-]?)([0-9]{4})$/', $postcode ); break; case 'PT': $valid = (bool) preg_match( '/^([0-9]{4})([-])([0-9]{3})$/', $postcode ); break; case 'PR': case 'US': $valid = (bool) preg_match( '/^([0-9]{5})(-[0-9]{4})?$/i', $postcode ); break; case 'CA': // CA Postal codes cannot contain D,F,I,O,Q,U and cannot start with W or Z. https://en.wikipedia.org/wiki/Postal_codes_in_Canada#Number_of_possible_postal_codes. $valid = (bool) preg_match( '/^([ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ])([\ ])?(\d[ABCEGHJKLMNPRSTVWXYZ]\d)$/i', $postcode ); break; case 'PL': $valid = (bool) preg_match( '/^([0-9]{2})([-])([0-9]{3})$/', $postcode ); break; case 'CZ': case 'SE': case 'SK': $valid = (bool) preg_match( "/^($country-)?([0-9]{3})(\s?)([0-9]{2})$/", $postcode ); break; case 'NL': $valid = (bool) preg_match( '/^([1-9][0-9]{3})(\s?)(?!SA|SD|SS)[A-Z]{2}$/i', $postcode ); break; case 'SI': $valid = (bool) preg_match( '/^([1-9][0-9]{3})$/', $postcode ); break; case 'LI': $valid = (bool) preg_match( '/^(94[8-9][0-9])$/', $postcode ); break; default: $valid = true; break; } return apply_filters( 'woocommerce_validate_postcode', $valid, $postcode, $country ); } /** * Check if is a GB postcode. * * @param string $to_check A postcode. * @return bool */ public static function is_gb_postcode( $to_check ) { // Permitted letters depend upon their position in the postcode. // https://en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom#Validation. $alpha1 = '[abcdefghijklmnoprstuwyz]'; // Character 1. $alpha2 = '[abcdefghklmnopqrstuvwxy]'; // Character 2. $alpha3 = '[abcdefghjkpstuw]'; // Character 3 == ABCDEFGHJKPSTUW. $alpha4 = '[abehmnprvwxy]'; // Character 4 == ABEHMNPRVWXY. $alpha5 = '[abdefghjlnpqrstuwxyz]'; // Character 5 != CIKMOV. $pcexp = array(); // Expression for postcodes: AN NAA, ANN NAA, AAN NAA, and AANN NAA. $pcexp[0] = '/^(' . $alpha1 . '{1}' . $alpha2 . '{0,1}[0-9]{1,2})([0-9]{1}' . $alpha5 . '{2})$/'; // Expression for postcodes: ANA NAA. $pcexp[1] = '/^(' . $alpha1 . '{1}[0-9]{1}' . $alpha3 . '{1})([0-9]{1}' . $alpha5 . '{2})$/'; // Expression for postcodes: AANA NAA. $pcexp[2] = '/^(' . $alpha1 . '{1}' . $alpha2 . '[0-9]{1}' . $alpha4 . ')([0-9]{1}' . $alpha5 . '{2})$/'; // Exception for the special postcode GIR 0AA. $pcexp[3] = '/^(gir)(0aa)$/'; // Standard BFPO numbers. $pcexp[4] = '/^(bfpo)([0-9]{1,4})$/'; // c/o BFPO numbers. $pcexp[5] = '/^(bfpo)(c\/o[0-9]{1,3})$/'; // Load up the string to check, converting into lowercase and removing spaces. $postcode = strtolower( $to_check ); $postcode = str_replace( ' ', '', $postcode ); // Assume we are not going to find a valid postcode. $valid = false; // Check the string against the six types of postcodes. foreach ( $pcexp as $regexp ) { if ( preg_match( $regexp, $postcode, $matches ) ) { // Remember that we have found that the code is valid and break from loop. $valid = true; break; } } return $valid; } /** * Format the postcode according to the country and length of the postcode. * * @param string $postcode Postcode to format. * @param string $country Country to format the postcode for. * @return string Formatted postcode. */ public static function format_postcode( $postcode, $country ) { return wc_format_postcode( $postcode, $country ); } /** * Format a given phone number. * * @param mixed $tel Phone number to format. * @return string */ public static function format_phone( $tel ) { return wc_format_phone_number( $tel ); } }
Upload File
Create Folder