Class WC_API_XML_Handler

WC_API_XML_Handler implements WC_API_Handler
Package: WooCommerce\API
Author: WooThemes
Located at includes/api/class-wc-api-xml-handler.php

Methods summary

public
# __construct( )

Add some response filters

Add some response filters

Since

2.1
public string
# get_content_type( )

Get the content type for the response

Get the content type for the response

Returns

string

Since

2.1

Implementation of

WC_API_Handler::get_content_type()
public array
# parse_body( string $data )

Parse the raw request body entity

Parse the raw request body entity

Parameters

$data
string
$data the raw request body

Returns

array

Since

2.1

Implementation of

WC_API_Handler::parse_body()
public string
# generate_response( array $data )

Generate an XML response given an array of data

Generate an XML response given an array of data

Parameters

$data
array
$data the response data

Returns

string

Since

2.1

Implementation of

WC_API_Handler::generate_response()
public array
# format_sales_report_data( array $data )

Adjust the sales report array format to change totals keyed with the sales date to become an attribute for the totals element instead

Adjust the sales report array format to change totals keyed with the sales date to become an attribute for the totals element instead

Parameters

$data
array
$data

Returns

array

Since

2.1
public array
# format_product_data( array $data )

Adjust the product data to handle options for attributes without a named child element and other fields that have no named child elements (e.g. categories = array( 'cat1', 'cat2' ) )

Adjust the product data to handle options for attributes without a named child element and other fields that have no named child elements (e.g. categories = array( 'cat1', 'cat2' ) )

Note that the parent product data for variations is also adjusted in the same manner as needed

Parameters

$data
array
$data

Returns

array

Since

2.1

Magic methods summary

WooCommerce API documentation generated by ApiGen 2.8.0