�PNG  IHDR22?�� pHYs  �� OiCCPPhotoshop ICC profilexڝSgTS�=���BK���KoR RB���&*! J�!��Q�EEȠ�����Q, � ��!���������{�kּ������>���� �H3Q5� �B�������.@� $p�d!s�#�~<<+"��x� �M��0���B�\���t�8K�@z�B�@F���&S�`�cb�P-`'������{[�!�� e�Dh;��V�EX0fK�9�-0IWfH���� � 0Q��){`�##x��F�W<�+��*x��<�$9E�[-qWW.(�I+6aa�@.�y�2�4���������x����6��_-��"bb���ϫp@�t~��,/��;�m��%�h^ �u��f�@����W�p�~<�5�j>{�-�]c�K'Xt����o��(�h���w��?�G�%�fI�q^D$.Tʳ?�D��*�A��,���� �`6�B$��BB d�r`)��B(�Ͱ*`/�@4�Qh��p.�U�=p�a��(�� A�a!ڈb�X#����!�H�$ ɈQ"K�5H1R�T UH�=r9�\F��;�2����G1���Q=� �C��7�F� �dt1�����r�=�6��Ыhڏ>C�0��3�l0.��B�8, �c˱"� ���V����cϱw�E� 6wB aAHXLXN�H� $4� 7 �Q�'"��K�&���b21�XH,#��/{�C�7$�C2'��I��T��F�nR#�,��4H#���dk�9�, +ȅ����3��!�[ �b@q��S�(R�jJ��4�e�2AU��Rݨ�T5�ZB���R�Q��4u�9̓IK�����hh�i��t�ݕN��W���G���w ��Ljg(�gw��L�Ӌ�T071���oUX*�*|�� �J�&�*/T����ު U�U�T��^S}�FU3S� Ԗ�U��P�SSg�;���g�oT?�~Y��Y�L�OC�Q��_�� c�x,!k ��u�5�&���|v*�����=���9C3J3W�R�f?�q��tN �(���~���)�)�4L�1e\k����X�H�Q�G�6������E�Y��A�J'\'Gg����S�Sݧ �M=:��.�k���Dw�n��^��Lo��y���}/�T�m���G X� $� �<�5qo</���QC]�@C�a�a�ᄑ��<��F�F�i�\�$�m�mƣ&&!&KM�M�RM��)�;L;L���͢�֙5�=1�2��כ߷`ZxZ,����eI��Z�Yn�Z9Y�XUZ]�F���%ֻ�����N�N���gð�ɶ�����ۮ�m�}agbg�Ů��}�}��= ���Z~s�r:V:ޚΜ�?}����/gX���3��)�i�S��Ggg�s�󈋉K��.�>.���Ƚ�Jt�q]�z���������ۯ�6�i�ܟ�4�)�Y3s���C�Q��? ��0k߬~OCO�g��#/c/�W�װ��w��a�>�>r��>�<7�2�Y_�7��ȷ�O�o�_��C#�d�z����%g��A�[��z|!��?:�e����A���AA�������!h�쐭!��Α�i�P~���a�a��~ '���W�?�p�X�1�5w��Cs�D�D�Dޛg1O9�-J5*>�.j<�7�4�?�.fY��X�XIlK9.*�6nl������� �{�/�]py�����.,:�@L�N8��A*��%�w%� y��g"/�6ш�C\*N�H*Mz�쑼5y$�3�,幄'���L Lݛ:��v m2=:�1����qB�!M��g�g�fvˬe����n��/��k���Y- �B��TZ(�*�geWf�͉�9���+��̳�ې7�����ᒶ��KW-X潬j9�������(�x��oʿ�ܔ���Ĺd�f�f���-�[����n �ڴ �V����E�/��(ۻ��C���<��e����;?T�T�T�T6��ݵa��n��{��4���[���>ɾ�UUM�f�e�I���?�������m]�Nmq����#�׹���=TR��+�G�����w- 6 U����#pDy��� �� :�v�{���vg/jB��F�S��[b[�O�>����z�G��499�?r����C�d�&����ˮ/~�����јѡ�򗓿m|������������x31^�V���w�w��O�| (�h���SЧ��������c3-� cHRMz%������u0�`:�o�_�F5IDATx��ytUս�?�;���fN$$��@B�!�k��� -*�gE���j�O�kQ�ʠ`U�B_ �AÐ0%�Ȕ�@r3ޛ;߳��$�@��v����^�s����������$��ߢ !�W��5�̱'-٘������4�>�Rƫ$�G��0U�H}�_ _� #��k�MJ/=�9Du *ڲ�k�PQ;0��j|�*�$�^컂脛y���>�z×� B��� ��(�:$�ʔ_�6��C!B����MVx��a��ζyY����j��ƋY2�9�F�{r��r�딟F��Q��hY6��� x��[l��RC��������nt@��;P��3��� F�w��7��:�P���ɋ'���mj���Bƪ�$�Q�L��y��߷g��\���z����v5�p�v$�v櫻�`6~K �Y�X����,�:��"�o�e0II"(��,������l_�C���/4�+f�E�!q��:����u����c��樼.UE�@� �]K�W���$-�h]�JG���Dz)�`��.�A/ ���mᏣc�3jK� �!�>���$�Q�!�_�? \�C2(E �M$Z I{�U���s�ǣ���=��@Բe ޻��W�����@ �w����}�9v,)��.}*|"�s��di���,���G�]W�AC�������|<����[��ߕ������K�*�G nߴ!��‹��J�!��6(L�a)��Am��������;adf��:�xm��nh�;֦I��(���o�C~ډa?�=��s����h��E������xp����)���_���t��W�����´;8���`dz=(��@@�+,�;�`�fhl��XȌ�3,uI�~z(J����� �ZX�A����H'�À�㜦�82|��a�n�z2��I���� ���EY�h�ε<�0�q�{��C��v�˅��?"@��χ�x�WS+��N�~�KQ�J�8ل�� _.W��� !TU{�����,��"�� �;�������HI S� ��))�o�1�H�D� ���� (� ;����"Ҕ��,���� �F=���O��&�Ph>�`���y��߲ &S��P�<��'��1s�1cĂ�N����2)����@�u��tv��<�+�-&�����h��[!FSG���' � z z0��<����8d&�����E0�,��<��"!P�b4��� �{S�����X����.�囤���T��hEF��X�q0"-<����h���]�Py*����F⩍��@v�˂�Y08�� .q��a��s����(!<̫1�3�L�H��7sYW�`��qtu�\7��?�@�Y�� %Ka�x�GZ�*W�P��y�����N0r9��Z�c�%���q,��k�����!!,��>���IB��� �x1�Xu�Y���v-���ֺ��N������JP��a�2`�e5��w��u;�6�i���̃��(K���ťa��(l51��JL��O'%���]���ٖ뿉!��{*�p+f ���i8��D�ȑ���ܩ�M��V��ӟz��x�7Z�1i}�^͜���6e����x��)u�d�ˏ�V�eG�\�X1�����=n�U'�~Y����L�\,�(d!x ,�:�TW8� M`r���@��r+v�Q0��>^;˴�VbF��('����� �*O��i��j�Ӆ����^�S3&� ���{������.ی�� N;��NU%d0�Ce\r"�C�b��&t7N�7��� �ȪD�[%l�۪�$��'m?�A9tI�9>��NVL ��� 6v~M�����ъ�B���0����9$&=ώm��W�0���L���&��E���f�f��'+�9��hv��7,���M��6�D�&�^� �����8 D֮�����o��k^z��O��hP�8q�5d*��YVq3�{��������#LX4�?��jP=3�~�؅c�ݰ�̱�ұ��8̲��2�G�����j��έ�9��w7���U�X�w�85C��?!I&���o&����L���I#�^�eV�,�^t5�k� �xs˛\��U�8��."���{���ǵ�l4��ݼ�;��r"���G�/~���gJV�N糦��ZZ^k+NN�D��I$�=OE�z����|*�*{��%k���G��>�`9��b;�s���8,�qs��c��.b��q�%�>r��n�R�Ƨ�%�,�A��le#�8���}; 21�0�b�&�QX�f���q�00����$>�h�N�'�a3��A���/�r ��L5�8�GԲ'�����w;��c#�q1���h$*��V^�k��QĽ�b:i������� ����H F#�_���,��]g����Ը����`RUU���� ��"�qD���>-��ϤI�~��3�̴�����NZ[[555�eeek7�m����YF#[��Đ��R��i��L�H�r ��@��J-�Pŝ��_|�-��6y��ks�V�U~��6���w.����(��0A� 4��f��� /���C�xŊ�ٳ����z=6�����rg���mKo��o�/����a�g���?'9%9��P��斓��~���L{�� �H��{AW��B��$����v�1b�&Mb�ر��ر#�0`�`xMBp! )Z�Nmo�mZ�g�}�eذaWTVV ���'99��C5��&�&+5�bT>|8��PUUETT����&���t��~TE%��'������b�tEGG;RSS�S�N�v��ѯ��t����u1@�ޚ"f��͈���r'L�Ph��m��ƌ�74o��`�x�q�P���NRSS�X,�����l&&&��MFFA!-��`��ҷ�n��Yuu�����x<I�LB%����KԒ50�!�3�bz�����ʸKL���;---�l6[��`��������Ȏ;�����egg4��!D�T��jWujyZ��������K����%����p�^���X,6��sV=�ܖ����6�3�X ���4ҿ��A2�&����_k�;d�� �VfOIEND�B`� 0x0x
PHP 8.1.34
Preview: wc-account-functions.php Size: 14.83 KB
//home2/astrociv/public_html/rudraraksham.com/wp-content/plugins/woocommerce/includes/wc-account-functions.php
<?php
/**
 * WooCommerce Account Functions
 *
 * Functions for account specific things.
 *
 * @package WooCommerce\Functions
 * @version 2.6.0
 */

use Automattic\WooCommerce\Enums\OrderStatus;
use Automattic\WooCommerce\Enums\PaymentGatewayFeature;

defined( 'ABSPATH' ) || exit;

/**
 * Returns the url to the lost password endpoint url.
 *
 * @param  string $default_url Default lost password URL.
 * @return string
 */
function wc_lostpassword_url( $default_url = '' ) {
	// Avoid loading too early.
	if ( ! did_action( 'init' ) ) {
		return $default_url;
	}

	// Don't change the admin form.
	if ( did_action( 'login_form_login' ) ) {
		return $default_url;
	}

	// Don't redirect to the woocommerce endpoint on global network admin lost passwords.
	if ( is_multisite() && isset( $_GET['redirect_to'] ) && false !== strpos( wp_unslash( $_GET['redirect_to'] ), network_admin_url() ) ) { // WPCS: input var ok, sanitization ok, CSRF ok.
		return $default_url;
	}

	$wc_account_page_url    = wc_get_page_permalink( 'myaccount' );
	$wc_account_page_exists = wc_get_page_id( 'myaccount' ) > 0;
	$lost_password_endpoint = get_option( 'woocommerce_myaccount_lost_password_endpoint' );

	if ( $wc_account_page_exists && ! empty( $lost_password_endpoint ) ) {
		return wc_get_endpoint_url( $lost_password_endpoint, '', $wc_account_page_url );
	} else {
		return $default_url;
	}
}

add_filter( 'lostpassword_url', 'wc_lostpassword_url', 10, 1 );

/**
 * Get the link to the edit account details page.
 *
 * @return string
 */
function wc_customer_edit_account_url() {
	$edit_account_url = wc_get_endpoint_url( 'edit-account', '', wc_get_page_permalink( 'myaccount' ) );

	return apply_filters( 'woocommerce_customer_edit_account_url', $edit_account_url );
}

/**
 * Get the edit address slug translation.
 *
 * @param  string $id   Address ID.
 * @param  bool   $flip Flip the array to make it possible to retrieve the values ​​from both sides.
 *
 * @return string       Address slug i18n.
 */
function wc_edit_address_i18n( $id, $flip = false ) {
	$slugs = apply_filters(
		'woocommerce_edit_address_slugs',
		array(
			'billing'  => sanitize_title( _x( 'billing', 'edit-address-slug', 'woocommerce' ) ),
			'shipping' => sanitize_title( _x( 'shipping', 'edit-address-slug', 'woocommerce' ) ),
		)
	);

	if ( $flip ) {
		$slugs = array_flip( $slugs );
	}

	if ( ! isset( $slugs[ $id ] ) ) {
		return $id;
	}

	return $slugs[ $id ];
}

/**
 * Get My Account menu items.
 *
 * @since 2.6.0
 * @return array
 */
function wc_get_account_menu_items() {
	$endpoints = array(
		'orders'          => get_option( 'woocommerce_myaccount_orders_endpoint', 'orders' ),
		'downloads'       => get_option( 'woocommerce_myaccount_downloads_endpoint', 'downloads' ),
		'edit-address'    => get_option( 'woocommerce_myaccount_edit_address_endpoint', 'edit-address' ),
		'payment-methods' => get_option( 'woocommerce_myaccount_payment_methods_endpoint', 'payment-methods' ),
		'edit-account'    => get_option( 'woocommerce_myaccount_edit_account_endpoint', 'edit-account' ),
		'customer-logout' => get_option( 'woocommerce_logout_endpoint', 'customer-logout' ),
	);

	$items = array(
		'dashboard'       => __( 'Dashboard', 'woocommerce' ),
		'orders'          => __( 'Orders', 'woocommerce' ),
		'downloads'       => __( 'Downloads', 'woocommerce' ),
		'edit-address'    => _n( 'Address', 'Addresses', ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) ? 2 : 1, 'woocommerce' ),
		'payment-methods' => __( 'Payment methods', 'woocommerce' ),
		'edit-account'    => __( 'Account details', 'woocommerce' ),
		'customer-logout' => __( 'Log out', 'woocommerce' ),
	);

	// Remove missing endpoints.
	foreach ( $endpoints as $endpoint_id => $endpoint ) {
		if ( empty( $endpoint ) ) {
			unset( $items[ $endpoint_id ] );
		}
	}

	// Check if payment gateways support add new payment methods.
	if ( isset( $items['payment-methods'] ) ) {
		$support_payment_methods = false;
		foreach ( WC()->payment_gateways->get_available_payment_gateways() as $gateway ) {
			if ( $gateway->supports( PaymentGatewayFeature::ADD_PAYMENT_METHOD ) || $gateway->supports( PaymentGatewayFeature::TOKENIZATION ) ) {
				$support_payment_methods = true;
				break;
			}
		}

		if ( ! $support_payment_methods ) {
			unset( $items['payment-methods'] );
		}
	}

	return apply_filters( 'woocommerce_account_menu_items', $items, $endpoints );
}

/**
 * Find current item in account menu.
 *
 * @since 9.3.0
 * @param string $endpoint Endpoint.
 * @return bool
 */
function wc_is_current_account_menu_item( $endpoint ) {
	global $wp;

	$current = isset( $wp->query_vars[ $endpoint ] );
	if ( 'dashboard' === $endpoint && ( isset( $wp->query_vars['page'] ) || empty( $wp->query_vars ) ) ) {
		$current = true; // Dashboard is not an endpoint, so needs a custom check.
	} elseif ( 'orders' === $endpoint && isset( $wp->query_vars['view-order'] ) ) {
		$current = true; // When looking at individual order, highlight Orders list item (to signify where in the menu the user currently is).
	} elseif ( 'payment-methods' === $endpoint && isset( $wp->query_vars['add-payment-method'] ) ) {
		$current = true;
	}

	return $current;
}

/**
 * Get account menu item classes.
 *
 * @since 2.6.0
 * @param string $endpoint Endpoint.
 * @return string
 */
function wc_get_account_menu_item_classes( $endpoint ) {
	$classes = array(
		'woocommerce-MyAccount-navigation-link',
		'woocommerce-MyAccount-navigation-link--' . $endpoint,
	);

	if ( wc_is_current_account_menu_item( $endpoint ) ) {
		$classes[] = 'is-active';
	}

	$classes = apply_filters( 'woocommerce_account_menu_item_classes', $classes, $endpoint );

	return implode( ' ', array_map( 'sanitize_html_class', $classes ) );
}

/**
 * Get account endpoint URL.
 *
 * @since 2.6.0
 * @param string $endpoint Endpoint.
 * @return string
 */
function wc_get_account_endpoint_url( $endpoint ) {
	if ( 'dashboard' === $endpoint ) {
		return wc_get_page_permalink( 'myaccount' );
	}

	$url = wc_get_endpoint_url( $endpoint, '', wc_get_page_permalink( 'myaccount' ) );

	if ( 'customer-logout' === $endpoint ) {
		return wp_nonce_url( $url, 'customer-logout' );
	}

	return $url;
}

/**
 * Get My Account > Orders columns.
 *
 * @since 2.6.0
 * @return array
 */
function wc_get_account_orders_columns() {
	/**
	 * Filters the array of My Account > Orders columns.
	 *
	 * @since 2.6.0
	 * @param array $columns Array of column labels keyed by column IDs.
	 */
	return apply_filters(
		'woocommerce_account_orders_columns',
		array(
			'order-number'  => __( 'Order', 'woocommerce' ),
			'order-date'    => __( 'Date', 'woocommerce' ),
			'order-status'  => __( 'Status', 'woocommerce' ),
			'order-total'   => __( 'Total', 'woocommerce' ),
			'order-actions' => __( 'Actions', 'woocommerce' ),
		)
	);
}

/**
 * Get My Account > Downloads columns.
 *
 * @since 2.6.0
 * @return array
 */
function wc_get_account_downloads_columns() {
	$columns = apply_filters(
		'woocommerce_account_downloads_columns',
		array(
			'download-product'   => __( 'Product', 'woocommerce' ),
			'download-remaining' => __( 'Downloads remaining', 'woocommerce' ),
			'download-expires'   => __( 'Expires', 'woocommerce' ),
			'download-file'      => __( 'Download', 'woocommerce' ),
			'download-actions'   => '&nbsp;',
		)
	);

	if ( ! has_filter( 'woocommerce_account_download_actions' ) ) {
		unset( $columns['download-actions'] );
	}

	return $columns;
}

/**
 * Get My Account > Payment methods columns.
 *
 * @since 2.6.0
 * @return array
 */
function wc_get_account_payment_methods_columns() {
	return apply_filters(
		'woocommerce_account_payment_methods_columns',
		array(
			'method'  => __( 'Method', 'woocommerce' ),
			'expires' => __( 'Expires', 'woocommerce' ),
			'actions' => '&nbsp;',
		)
	);
}

/**
 * Get My Account > Payment methods types
 *
 * @since 2.6.0
 * @return array
 */
function wc_get_account_payment_methods_types() {
	return apply_filters(
		'woocommerce_payment_methods_types',
		array(
			'cc'     => __( 'Credit card', 'woocommerce' ),
			'echeck' => __( 'eCheck', 'woocommerce' ),
		)
	);
}

/**
 * Get account orders actions.
 *
 * @since  3.2.0
 * @param  int|WC_Order $order Order instance or ID.
 * @return array
 */
function wc_get_account_orders_actions( $order ) {
	if ( ! is_object( $order ) ) {
		$order_id = absint( $order );
		$order    = wc_get_order( $order_id );
	}

	if ( ! $order instanceof WC_Order ) {
		return array();
	}

	$actions = array(
		'pay'    => array(
			'url'        => $order->get_checkout_payment_url(),
			'name'       => __( 'Pay', 'woocommerce' ),
			/* translators: %s: order number */
			'aria-label' => sprintf( __( 'Pay for order %s', 'woocommerce' ), $order->get_order_number() ),
		),
		'view'   => array(
			'url'        => $order->get_view_order_url(),
			'name'       => __( 'View', 'woocommerce' ),
			/* translators: %s: order number */
			'aria-label' => sprintf( __( 'View order %s', 'woocommerce' ), $order->get_order_number() ),
		),
		'cancel' => array(
			'url'        => $order->get_cancel_order_url( wc_get_page_permalink( 'myaccount' ) ),
			'name'       => __( 'Cancel', 'woocommerce' ),
			/* translators: %s: order number */
			'aria-label' => sprintf( __( 'Cancel order %s', 'woocommerce' ), $order->get_order_number() ),
		),
	);

	if ( ! $order->needs_payment() ) {
		unset( $actions['pay'] );
	}

	/**
	 * Filters the valid order statuses for cancel action.
	 *
	 * @since 3.2.0
	 *
	 * @param array    $statuses_for_cancel Array of valid order statuses for cancel action.
	 * @param WC_Order $order                Order instance.
	 */
	$statuses_for_cancel = apply_filters( 'woocommerce_valid_order_statuses_for_cancel', array( OrderStatus::PENDING, OrderStatus::FAILED ), $order );
	if ( ! in_array( $order->get_status(), $statuses_for_cancel, true ) ) {
		unset( $actions['cancel'] );
	}

	/**
	 * Filters the actions available for an order on the My Account orders list.
	 *
	 * @since 2.0.0
	 *
	 * @param array    $actions Array of order actions, keyed by action slug. Each action is an array with 'url' and 'name' keys.
	 * @param WC_Order $order   Order instance.
	 */
	$actions = apply_filters( 'woocommerce_my_account_my_orders_actions', $actions, $order );

	if ( ! is_array( $actions ) ) {
		return array();
	}

	// Filter out malformed action entries from third-party extensions.
	return array_filter(
		$actions,
		static function ( $action ) {
			return is_array( $action )
				&& isset( $action['name'], $action['url'] )
				&& is_string( $action['name'] )
				&& is_string( $action['url'] );
		}
	);
}

/**
 * Get account formatted address.
 *
 * @since  3.2.0
 * @param  string $address_type Type of address; 'billing' or 'shipping'.
 * @param  int    $customer_id  Customer ID.
 *                              Defaults to 0.
 * @return string
 */
function wc_get_account_formatted_address( $address_type = 'billing', $customer_id = 0 ) {
	$getter  = "get_{$address_type}";
	$address = array();

	if ( 0 === $customer_id ) {
		$customer_id = get_current_user_id();
	}

	$customer = new WC_Customer( $customer_id );

	if ( is_callable( array( $customer, $getter ) ) ) {
		$address = $customer->$getter();
		unset( $address['email'], $address['tel'] );
	}

	return WC()->countries->get_formatted_address( apply_filters( 'woocommerce_my_account_my_address_formatted_address', $address, $customer->get_id(), $address_type ) );
}

/**
 * Returns an array of a user's saved payments list for output on the account tab.
 *
 * @since  2.6
 * @param  array $list         List of payment methods passed from wc_get_customer_saved_methods_list().
 * @param  int   $customer_id  The customer to fetch payment methods for.
 * @return array               Filtered list of customers payment methods.
 */
function wc_get_account_saved_payment_methods_list( $list, $customer_id ) {
	$payment_tokens = WC_Payment_Tokens::get_customer_tokens( $customer_id );
	foreach ( $payment_tokens as $payment_token ) {
		$delete_url      = wc_get_endpoint_url( 'delete-payment-method', $payment_token->get_id() );
		$delete_url      = wp_nonce_url( $delete_url, 'delete-payment-method-' . $payment_token->get_id() );
		$set_default_url = wc_get_endpoint_url( 'set-default-payment-method', $payment_token->get_id() );
		$set_default_url = wp_nonce_url( $set_default_url, 'set-default-payment-method-' . $payment_token->get_id() );

		$type            = strtolower( $payment_token->get_type() );
		$list[ $type ][] = array(
			'method'     => array(
				'gateway' => $payment_token->get_gateway_id(),
			),
			'expires'    => esc_html__( 'N/A', 'woocommerce' ),
			'is_default' => $payment_token->is_default(),
			'actions'    => array(
				'delete' => array(
					'url'  => $delete_url,
					'name' => esc_html__( 'Delete', 'woocommerce' ),
				),
			),
		);
		$key             = key( array_slice( $list[ $type ], -1, 1, true ) );

		if ( ! $payment_token->is_default() ) {
			$list[ $type ][ $key ]['actions']['default'] = array(
				'url'  => $set_default_url,
				'name' => esc_html__( 'Make default', 'woocommerce' ),
			);
		}

		$list[ $type ][ $key ] = apply_filters( 'woocommerce_payment_methods_list_item', $list[ $type ][ $key ], $payment_token );
	}
	return $list;
}

add_filter( 'woocommerce_saved_payment_methods_list', 'wc_get_account_saved_payment_methods_list', 10, 2 );

/**
 * Controls the output for credit cards on the my account page.
 *
 * @since 2.6
 * @param  array            $item         Individual list item from woocommerce_saved_payment_methods_list.
 * @param  WC_Payment_Token $payment_token The payment token associated with this method entry.
 * @return array                           Filtered item.
 */
function wc_get_account_saved_payment_methods_list_item_cc( $item, $payment_token ) {
	if ( 'cc' !== strtolower( $payment_token->get_type() ) ) {
		return $item;
	}

	$card_type               = $payment_token->get_card_type();
	$item['method']['last4'] = $payment_token->get_last4();
	$item['method']['brand'] = ( ! empty( $card_type ) ? ucwords( str_replace( '_', ' ', $card_type ) ) : esc_html__( 'Credit card', 'woocommerce' ) );
	$item['expires']         = $payment_token->get_expiry_month() . '/' . substr( $payment_token->get_expiry_year(), -2 );

	return $item;
}

add_filter( 'woocommerce_payment_methods_list_item', 'wc_get_account_saved_payment_methods_list_item_cc', 10, 2 );

/**
 * Controls the output for eChecks on the my account page.
 *
 * @since 2.6
 * @param  array            $item         Individual list item from woocommerce_saved_payment_methods_list.
 * @param  WC_Payment_Token $payment_token The payment token associated with this method entry.
 * @return array                           Filtered item.
 */
function wc_get_account_saved_payment_methods_list_item_echeck( $item, $payment_token ) {
	if ( 'echeck' !== strtolower( $payment_token->get_type() ) ) {
		return $item;
	}

	$item['method']['last4'] = $payment_token->get_last4();
	$item['method']['brand'] = esc_html__( 'eCheck', 'woocommerce' );

	return $item;
}

add_filter( 'woocommerce_payment_methods_list_item', 'wc_get_account_saved_payment_methods_list_item_echeck', 10, 2 );

Directory Contents

Dirs: 28 × Files: 115
Name Size Perms Modified Actions
abstracts DIR
- drwxr-xr-x 2026-07-28 11:37:05
Edit Download
admin DIR
- drwxr-xr-x 2026-07-28 11:37:06
Edit Download
blocks DIR
- drwxr-xr-x 2026-07-28 11:37:06
Edit Download
cli DIR
- drwxr-xr-x 2026-07-28 11:37:06
Edit Download
- drwxr-xr-x 2026-07-28 11:37:06
Edit Download
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
emails DIR
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
export DIR
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
gateways DIR
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
import DIR
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
- drwxr-xr-x 2026-07-28 11:36:53
Edit Download
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
legacy DIR
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
libraries DIR
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
queue DIR
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
rest-api DIR
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
shipping DIR
- drwxr-xr-x 2026-07-28 11:36:53
Edit Download
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
tracks DIR
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
traits DIR
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
walkers DIR
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
- drwxr-xr-x 2026-07-28 11:37:07
Edit Download
widgets DIR
- drwxr-xr-x 2026-07-28 11:37:08
Edit Download
133.30 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
12.69 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
5.27 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
4.68 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
3.45 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
1.78 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
6.89 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
35.04 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
10.41 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
13.51 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
3.37 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
25.37 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
28.48 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
75.50 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
50.48 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
3.34 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
23.08 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
51.69 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
44.64 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
3.37 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
10.34 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
33.28 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
1.29 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
6.59 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
2.26 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
6.59 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
7.34 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
36.64 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
28.54 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
39.64 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
4.24 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
48.17 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
34.44 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
30.43 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
1.99 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
11.46 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
4.33 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
107.57 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
1.28 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
3.90 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
9.41 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
2.33 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
8.98 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
4.08 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
9.99 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
5.80 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
18.33 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
9.58 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
6.50 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
22.70 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
2.52 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
5.99 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
78.37 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
14.40 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
6.24 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
39.09 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
29.65 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
1.79 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
13.61 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
14.69 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
17.22 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
7.87 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
13.18 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
4.98 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
4.59 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
6.81 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
2.27 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
2.70 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
25.30 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
20.22 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
37.55 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
4.00 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
7.74 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
15.44 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
5.05 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
21.55 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
276 B lrw-r--r-- 2026-07-28 11:37:06
Edit Download
24.57 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
9.34 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
13.08 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
5.00 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
13.03 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
18.82 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
24.96 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
39.87 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
20.42 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
51.50 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
5.79 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
32.24 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
63.94 KB lrw-r--r-- 2026-07-28 11:37:06
Edit Download
14.83 KB lrw-r--r-- 2026-07-28 11:37:07
Edit Download
22.81 KB lrw-r--r-- 2026-07-28 11:37:07
Edit Download
4.17 KB lrw-r--r-- 2026-07-28 11:37:07
Edit Download
21.58 KB lrw-r--r-- 2026-07-28 11:37:07
Edit Download
15.53 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
79.00 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
5.56 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
40.38 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
49.91 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
2.43 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
8.49 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
43.99 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
5.03 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
5.97 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
9.99 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
69.18 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
13.93 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
17.43 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
148.55 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
12.84 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
24.63 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
108.05 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
36.36 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
7.49 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
2.01 KB lrw-r--r-- 2026-07-28 11:37:08
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).
© 2026 0xNothings — Secure File Manager. All rights reserved. Built with ❤️ & Tailwind x Dark UI