X7ROOT File Manager
Current Path:
/home/notabjze/hourglass.life/wp-content/plugins/woocommerce/src/Utilities
home
/
notabjze
/
hourglass.life
/
wp-content
/
plugins
/
woocommerce
/
src
/
Utilities
/
ðŸ“
..
📄
ArrayUtil.php
(12.99 KB)
📄
DiscountsUtil.php
(1.1 KB)
📄
FeaturesUtil.php
(4.49 KB)
📄
I18nUtil.php
(1.69 KB)
📄
LoggingUtil.php
(3.18 KB)
📄
NumberUtil.php
(5.89 KB)
📄
OrderUtil.php
(8.17 KB)
📄
PluginUtil.php
(12.89 KB)
📄
RestApiUtil.php
(781 B)
📄
ShippingUtil.php
(1020 B)
📄
StringUtil.php
(5.09 KB)
📄
TimeUtil.php
(1.16 KB)
Editing: RestApiUtil.php
<?php namespace Automattic\WooCommerce\Utilities; /** * Utility methods related to the REST API. */ class RestApiUtil { /** * Get data from a WooCommerce API endpoint. * This method used to be part of the WooCommerce Legacy REST API. * * @since 9.0.0 * * @param string $endpoint Endpoint. * @param array $params Params to pass with request. * @return array|\WP_Error */ public function get_endpoint_data( $endpoint, $params = array() ) { $request = new \WP_REST_Request( 'GET', $endpoint ); if ( $params ) { $request->set_query_params( $params ); } $response = rest_do_request( $request ); $server = rest_get_server(); $json = wp_json_encode( $server->response_to_data( $response, false ) ); return json_decode( $json, true ); } }
Upload File
Create Folder