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: wc-page-functions.php
<?php /** * WooCommerce Page Functions * * Functions related to pages and menus. * * @package WooCommerce\Functions * @version 2.6.0 */ defined( 'ABSPATH' ) || exit; /** * Replace a page title with the endpoint title. * * @param string $title Post title. * @return string */ function wc_page_endpoint_title( $title ) { global $wp_query; if ( ! is_null( $wp_query ) && ! is_admin() && is_main_query() && in_the_loop() && is_page() && is_wc_endpoint_url() ) { $endpoint = WC()->query->get_current_endpoint(); $action = isset( $_GET['action'] ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : ''; $endpoint_title = WC()->query->get_endpoint_title( $endpoint, $action ); $title = $endpoint_title ? $endpoint_title : $title; remove_filter( 'the_title', 'wc_page_endpoint_title' ); } return $title; } add_filter( 'the_title', 'wc_page_endpoint_title' ); /** * Retrieve page ids - used for myaccount, edit_address, shop, cart, checkout, pay, view_order, terms. returns -1 if no page is found. * * @param string $page Page slug. * @return int */ function wc_get_page_id( $page ) { if ( 'pay' === $page || 'thanks' === $page ) { wc_deprecated_argument( __FUNCTION__, '2.1', 'The "pay" and "thanks" pages are no-longer used - an endpoint is added to the checkout instead. To get a valid link use the WC_Order::get_checkout_payment_url() or WC_Order::get_checkout_order_received_url() methods instead.' ); $page = 'checkout'; } if ( 'change_password' === $page || 'edit_address' === $page || 'lost_password' === $page ) { wc_deprecated_argument( __FUNCTION__, '2.1', 'The "change_password", "edit_address" and "lost_password" pages are no-longer used - an endpoint is added to the my-account instead. To get a valid link use the wc_customer_edit_account_url() function instead.' ); $page = 'myaccount'; } $page = apply_filters( 'woocommerce_get_' . $page . '_page_id', get_option( 'woocommerce_' . $page . '_page_id' ) ); return $page ? absint( $page ) : -1; } /** * Retrieve page permalink. * * @param string $page page slug. * @param string|bool $fallback Fallback URL if page is not set. Defaults to home URL. @since 3.4.0. * @return string */ function wc_get_page_permalink( $page, $fallback = null ) { $page_id = wc_get_page_id( $page ); $permalink = 0 < $page_id ? get_permalink( $page_id ) : ''; if ( ! $permalink ) { $permalink = is_null( $fallback ) ? get_home_url() : $fallback; } return apply_filters( 'woocommerce_get_' . $page . '_page_permalink', $permalink ); } /** * Get endpoint URL. * * Gets the URL for an endpoint, which varies depending on permalink settings. * * @param string $endpoint Endpoint slug. * @param string $value Query param value. * @param string $permalink Permalink. * * @return string */ function wc_get_endpoint_url( $endpoint, $value = '', $permalink = '' ) { if ( ! $permalink ) { $permalink = get_permalink(); } // Map endpoint to options. $query_vars = WC()->query->get_query_vars(); $endpoint = ! empty( $query_vars[ $endpoint ] ) ? $query_vars[ $endpoint ] : $endpoint; $value = ( get_option( 'woocommerce_myaccount_edit_address_endpoint', 'edit-address' ) === $endpoint ) ? wc_edit_address_i18n( $value ) : $value; if ( get_option( 'permalink_structure' ) ) { if ( strstr( $permalink, '?' ) ) { $query_string = '?' . wp_parse_url( $permalink, PHP_URL_QUERY ); $permalink = current( explode( '?', $permalink ) ); } else { $query_string = ''; } $url = trailingslashit( $permalink ); if ( $value ) { $url .= trailingslashit( $endpoint ) . user_trailingslashit( $value ); } else { $url .= user_trailingslashit( $endpoint ); } $url .= $query_string; } else { $url = add_query_arg( $endpoint, $value, $permalink ); } return apply_filters( 'woocommerce_get_endpoint_url', $url, $endpoint, $value, $permalink ); } /** * Hide or adjust menu items conditionally. * * @param array $items Navigation items. * @return array */ function wc_nav_menu_items( $items ) { $logout_endpoint = get_option( 'woocommerce_logout_endpoint', 'customer-logout' ); if ( ! empty( $logout_endpoint ) && ! empty( $items ) && is_array( $items ) ) { foreach ( $items as $key => $item ) { if ( empty( $item->url ) ) { continue; } $path = wp_parse_url( $item->url, PHP_URL_PATH ) ?? ''; $query = wp_parse_url( $item->url, PHP_URL_QUERY ) ?? ''; $is_logout_link = strstr( $path, $logout_endpoint ) || strstr( $query, $logout_endpoint ); if ( ! $is_logout_link ) { continue; } if ( is_user_logged_in() ) { $items[ $key ]->url = wp_nonce_url( $item->url, 'customer-logout' ); } else { unset( $items[ $key ] ); } } } return $items; } add_filter( 'wp_nav_menu_objects', 'wc_nav_menu_items', 10 ); /** * Hide menu items in navigation blocks conditionally. * * Does the same thing as wc_nav_menu_items but for block themes. * * @since 9.3.0 * @param \WP_Block_list $inner_blocks Inner blocks. * @return \WP_Block_list */ function wc_nav_menu_inner_blocks( $inner_blocks ) { $logout_endpoint = get_option( 'woocommerce_logout_endpoint', 'customer-logout' ); if ( ! empty( $logout_endpoint ) && $inner_blocks ) { foreach ( $inner_blocks as $inner_block_key => $inner_block ) { $url = $inner_block->parsed_block['attrs']['url'] ?? ''; $path = wp_parse_url( $url, PHP_URL_PATH ) ?? ''; $query = wp_parse_url( $url, PHP_URL_QUERY ) ?? ''; $is_logout_link = strstr( $path, $logout_endpoint ) || strstr( $query, $logout_endpoint ); if ( ! $is_logout_link ) { continue; } if ( is_user_logged_in() ) { $inner_block->parsed_block['attrs']['url'] = wp_nonce_url( $inner_block->parsed_block['attrs']['url'], 'customer-logout' ); } else { unset( $inner_blocks[ $inner_block_key ] ); } } } return $inner_blocks; } add_filter( 'block_core_navigation_render_inner_blocks', 'wc_nav_menu_inner_blocks' ); /** * Fix active class in nav for shop page. * * @param array $menu_items Menu items. * @return array */ function wc_nav_menu_item_classes( $menu_items ) { if ( ! is_woocommerce() ) { return $menu_items; } $shop_page = wc_get_page_id( 'shop' ); $page_for_posts = (int) get_option( 'page_for_posts' ); if ( ! empty( $menu_items ) && is_array( $menu_items ) ) { foreach ( $menu_items as $key => $menu_item ) { $classes = (array) $menu_item->classes; $menu_id = (int) $menu_item->object_id; // Unset active class for blog page. if ( $page_for_posts === $menu_id && isset( $menu_item->object ) && 'page' === $menu_item->object ) { $menu_items[ $key ]->current = false; if ( in_array( 'current_page_parent', $classes, true ) ) { unset( $classes[ array_search( 'current_page_parent', $classes, true ) ] ); } if ( in_array( 'current-menu-item', $classes, true ) ) { unset( $classes[ array_search( 'current-menu-item', $classes, true ) ] ); } } elseif ( is_shop() && $shop_page === $menu_id && 'page' === $menu_item->object ) { // Set active state if this is the shop page link. $menu_items[ $key ]->current = true; $classes[] = 'current-menu-item'; $classes[] = 'current_page_item'; } elseif ( is_singular( 'product' ) && $shop_page === $menu_id ) { // Set parent state if this is a product page. $classes[] = 'current_page_parent'; } $menu_items[ $key ]->classes = array_unique( $classes ); } } return $menu_items; } add_filter( 'wp_nav_menu_objects', 'wc_nav_menu_item_classes', 2 ); /** * Fix active class in wp_list_pages for shop page. * * See details in https://github.com/woocommerce/woocommerce/issues/177. * * @param string $pages Pages list. * @return string */ function wc_list_pages( $pages ) { if ( ! is_woocommerce() ) { return $pages; } // Remove current_page_parent class from any item. $pages = str_replace( 'current_page_parent', '', $pages ); // Find shop_page_id through woocommerce options. $shop_page = 'page-item-' . wc_get_page_id( 'shop' ); if ( is_shop() ) { // Add current_page_item class to shop page. return str_replace( $shop_page, $shop_page . ' current_page_item', $pages ); } // Add current_page_parent class to shop page. return str_replace( $shop_page, $shop_page . ' current_page_parent', $pages ); } add_filter( 'wp_list_pages', 'wc_list_pages' );
Upload File
Create Folder