scrutinizer patches
This commit is contained in:
parent
bdd289f5f9
commit
c4ef86d44e
|
@ -457,7 +457,7 @@ abstract class WC_Email extends WC_Settings_API {
|
|||
/**
|
||||
* Apply inline styles to dynamic content.
|
||||
*
|
||||
* @param mixed $content
|
||||
* @param string|null $content
|
||||
* @return string
|
||||
*/
|
||||
public function style_inline( $content ) {
|
||||
|
@ -521,9 +521,9 @@ abstract class WC_Email extends WC_Settings_API {
|
|||
/**
|
||||
* Send the email.
|
||||
*
|
||||
* @param mixed $to
|
||||
* @param mixed $subject
|
||||
* @param mixed $message
|
||||
* @param string $to
|
||||
* @param string $subject
|
||||
* @param string $message
|
||||
* @param string $headers
|
||||
* @param string $attachments
|
||||
* @return bool
|
||||
|
@ -589,7 +589,7 @@ abstract class WC_Email extends WC_Settings_API {
|
|||
* - Saves the options to the DB
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @return bool
|
||||
* @return boolean|null
|
||||
*/
|
||||
public function process_admin_options() {
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ abstract class WC_Abstract_Order {
|
|||
* should be used. It is possible, but the aforementioned are preferred and are the only
|
||||
* methods that will be maintained going forward.
|
||||
*
|
||||
* @param string $id The order id. Default ''.
|
||||
*/
|
||||
public function __construct( $order = '' ) {
|
||||
|
||||
|
@ -78,6 +77,7 @@ abstract class WC_Abstract_Order {
|
|||
* Set the payment method for the order
|
||||
*
|
||||
* @param WC_Payment_Gateway
|
||||
* @param WC_Payment_Gateway $payment_method
|
||||
*/
|
||||
public function set_payment_method( $payment_method ) {
|
||||
|
||||
|
@ -227,7 +227,7 @@ abstract class WC_Abstract_Order {
|
|||
* Add coupon code to the order
|
||||
*
|
||||
* @param string $code
|
||||
* @param float|int $discount_amount
|
||||
* @param integer $discount_amount
|
||||
* @return int|bool Item ID or false
|
||||
*/
|
||||
public function add_coupon( $code, $discount_amount = 0 ) {
|
||||
|
@ -810,7 +810,6 @@ abstract class WC_Abstract_Order {
|
|||
/**
|
||||
* Checks the order status against a passed in status.
|
||||
*
|
||||
* @param mixed $type Array or string of types
|
||||
* @return bool
|
||||
*/
|
||||
public function has_status( $status ) {
|
||||
|
@ -2350,7 +2349,7 @@ abstract class WC_Abstract_Order {
|
|||
/**
|
||||
* send_stock_notifications function.
|
||||
*
|
||||
* @param object $product
|
||||
* @param WC_Product $product
|
||||
* @param int $new_stock
|
||||
* @param int $qty_ordered
|
||||
*/
|
||||
|
@ -2432,7 +2431,7 @@ abstract class WC_Abstract_Order {
|
|||
/**
|
||||
* Checks if an order needs display the shipping address, based on shipping method
|
||||
*
|
||||
* @return bool
|
||||
* @return boolean|null
|
||||
*/
|
||||
public function needs_shipping_address() {
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ abstract class WC_Payment_Gateway extends WC_Settings_API {
|
|||
* @param int $order_id
|
||||
* @param float $amount
|
||||
* @param string $reason
|
||||
* @return bool|wp_error True or false based on success, or a WP_Error object
|
||||
* @return boolean True or false based on success, or a WP_Error object
|
||||
*/
|
||||
public function process_refund( $order_id, $amount = null, $reason = '' ) {
|
||||
return false;
|
||||
|
@ -245,7 +245,7 @@ abstract class WC_Payment_Gateway extends WC_Settings_API {
|
|||
* Gateways should override this to declare support (or lack of support) for a feature.
|
||||
* For backward compatibility, gateways support 'products' by default, but nothing else.
|
||||
*
|
||||
* @param $feature string The name of a feature to test support for.
|
||||
* @param string $feature string The name of a feature to test support for.
|
||||
* @return bool True if the gateway supports the feature, false otherwise.
|
||||
* @since 1.5.7
|
||||
*/
|
||||
|
|
|
@ -53,7 +53,7 @@ class WC_Product {
|
|||
/**
|
||||
* __get function.
|
||||
*
|
||||
* @param mixed $key
|
||||
* @param string $key
|
||||
* @return mixed
|
||||
*/
|
||||
public function __get( $key ) {
|
||||
|
@ -225,6 +225,7 @@ class WC_Product {
|
|||
/**
|
||||
* set_stock_status function.
|
||||
*
|
||||
* @param string $status
|
||||
* @return void
|
||||
*/
|
||||
public function set_stock_status( $status ) {
|
||||
|
@ -248,7 +249,7 @@ class WC_Product {
|
|||
*
|
||||
* Backwards compat with downloadable/virtual.
|
||||
*
|
||||
* @param mixed $type Array or string of types
|
||||
* @param string $type Array or string of types
|
||||
* @return bool
|
||||
*/
|
||||
public function is_type( $type ) {
|
||||
|
@ -908,7 +909,7 @@ class WC_Product {
|
|||
/**
|
||||
* Functions for getting parts of a price, in html, used by get_price_html.
|
||||
*
|
||||
* @param mixed $from String or float to wrap with 'from' text
|
||||
* @param string $from String or float to wrap with 'from' text
|
||||
* @param mixed $to String or float to wrap with 'to' text
|
||||
* @return string
|
||||
*/
|
||||
|
@ -1227,7 +1228,7 @@ class WC_Product {
|
|||
/**
|
||||
* Returns whether or not the product has any attributes set.
|
||||
*
|
||||
* @return mixed
|
||||
* @return boolean
|
||||
*/
|
||||
public function has_attributes() {
|
||||
|
||||
|
@ -1354,7 +1355,6 @@ class WC_Product {
|
|||
/**
|
||||
* Get product name with SKU or ID. Used within admin.
|
||||
*
|
||||
* @param mixed $product
|
||||
* @return string Formatted product name
|
||||
*/
|
||||
public function get_formatted_name() {
|
||||
|
|
|
@ -54,6 +54,7 @@ abstract class WC_Widget extends WP_Widget {
|
|||
|
||||
/**
|
||||
* Cache the widget
|
||||
* @param string $content
|
||||
*/
|
||||
public function cache_widget( $args, $content ) {
|
||||
$cache[ $args['widget_id'] ] = $content;
|
||||
|
|
|
@ -803,6 +803,7 @@ class WC_Admin_Post_Types {
|
|||
|
||||
/**
|
||||
* Quick edit
|
||||
* @param integer $post_id
|
||||
*/
|
||||
private function quick_edit_save( $post_id, $product ) {
|
||||
global $wpdb;
|
||||
|
@ -924,6 +925,7 @@ class WC_Admin_Post_Types {
|
|||
|
||||
/**
|
||||
* Bulk edit
|
||||
* @param integer $post_id
|
||||
*/
|
||||
public function bulk_edit_save( $post_id, $product ) {
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ class WC_Admin_Settings {
|
|||
/**
|
||||
* Get a setting from the settings API.
|
||||
*
|
||||
* @param mixed $option
|
||||
* @param mixed $option_name
|
||||
* @return string
|
||||
*/
|
||||
public static function get_option( $option_name, $default = '' ) {
|
||||
|
|
|
@ -240,7 +240,7 @@ class WC_Admin_Status {
|
|||
*
|
||||
* @since 2.1.1
|
||||
* @param string $file Path to the file
|
||||
* @param array $all_headers List of headers, in the format array('HeaderKey' => 'Header Name')
|
||||
* @return string
|
||||
*/
|
||||
public static function get_file_version( $file ) {
|
||||
// We don't need to write to the file, so just open for reading.
|
||||
|
|
|
@ -266,7 +266,7 @@ class WC_Settings_General extends WC_Settings_Page {
|
|||
* Output a colour picker input box.
|
||||
*
|
||||
* @param mixed $name
|
||||
* @param mixed $id
|
||||
* @param string $id
|
||||
* @param mixed $value
|
||||
* @param string $desc (default: '')
|
||||
*/
|
||||
|
|
|
@ -46,7 +46,7 @@ function wc_get_screen_ids() {
|
|||
*
|
||||
* @access public
|
||||
* @param mixed $slug Slug for the new page
|
||||
* @param mixed $option Option name to store the page's ID
|
||||
* @param string $option Option name to store the page's ID
|
||||
* @param string $page_title (default: '') Title for the new page
|
||||
* @param string $page_content (default: '') Content for the new page
|
||||
* @param int $post_parent (default: 0) Parent for the new page
|
||||
|
@ -130,7 +130,7 @@ function woocommerce_update_options( $options ) {
|
|||
/**
|
||||
* Get a setting from the settings API.
|
||||
*
|
||||
* @param mixed $option
|
||||
* @param mixed $option_name
|
||||
* @return string
|
||||
*/
|
||||
function woocommerce_settings_get_option( $option_name, $default = '' ) {
|
||||
|
|
|
@ -674,7 +674,7 @@ class WC_API_Customers extends WC_API_Resource {
|
|||
*
|
||||
* @since 2.1
|
||||
* @see WC_API_Resource::validate_request()
|
||||
* @param string|int $id the customer ID
|
||||
* @param integer $id the customer ID
|
||||
* @param string $type the request type, unused because this method overrides the parent class
|
||||
* @param string $context the context of the request, either `read`, `edit` or `delete`
|
||||
* @return int|WP_Error valid user ID or WP_Error if any of the checks fails
|
||||
|
|
|
@ -1354,7 +1354,6 @@ class WC_API_Orders extends WC_API_Resource {
|
|||
*
|
||||
* @since 2.2
|
||||
* @param string $order_id order ID
|
||||
* @param int $refund order refund ID
|
||||
* @param string|null $fields fields to limit response to
|
||||
* @return array
|
||||
*/
|
||||
|
|
|
@ -495,7 +495,7 @@ class WC_API_Products extends WC_API_Resource {
|
|||
*
|
||||
* @since 2.1
|
||||
* @param WC_Product $product
|
||||
* @return array
|
||||
* @return WC_Product
|
||||
*/
|
||||
private function get_product_data( $product ) {
|
||||
|
||||
|
@ -1440,7 +1440,7 @@ class WC_API_Products extends WC_API_Resource {
|
|||
*
|
||||
* @since 2.2
|
||||
* @param string $label
|
||||
* @return stdClass
|
||||
* @return string|null
|
||||
*/
|
||||
private function get_attribute_taxonomy_by_label( $label ) {
|
||||
$taxonomy = null;
|
||||
|
@ -1653,7 +1653,7 @@ class WC_API_Products extends WC_API_Resource {
|
|||
* Get product image as attachment
|
||||
*
|
||||
* @since 2.2
|
||||
* @param array $upload
|
||||
* @param integer $upload
|
||||
* @param int $id
|
||||
* @return int
|
||||
*/
|
||||
|
|
|
@ -53,7 +53,7 @@ class WC_API {
|
|||
* @access public
|
||||
* @since 2.0
|
||||
* @param $vars
|
||||
* @return array
|
||||
* @return string[]
|
||||
*/
|
||||
public function add_query_vars( $vars ) {
|
||||
$vars[] = 'wc-api';
|
||||
|
@ -157,7 +157,7 @@ class WC_API {
|
|||
* Register available API resources
|
||||
*
|
||||
* @since 2.1
|
||||
* @param object $server the REST server
|
||||
* @param WC_API_Server $server the REST server
|
||||
*/
|
||||
public function register_resources( $server ) {
|
||||
|
||||
|
|
|
@ -775,7 +775,7 @@ class WC_Cart {
|
|||
* Add a product to the cart.
|
||||
*
|
||||
* @param string $product_id contains the id of the product to add to the cart
|
||||
* @param string $quantity contains the quantity of the item to add
|
||||
* @param integer $quantity contains the quantity of the item to add
|
||||
* @param int $variation_id
|
||||
* @param array $variation attribute values
|
||||
* @param array $cart_item_data extra cart item data we want to pass into the item
|
||||
|
@ -1783,7 +1783,7 @@ class WC_Cart {
|
|||
*
|
||||
* @access public
|
||||
* @param mixed $values
|
||||
* @param mixed $price
|
||||
* @param double $price
|
||||
*/
|
||||
public function apply_product_discounts_after_tax( $values, $price ) {
|
||||
if ( ! empty( $this->applied_coupons ) ) {
|
||||
|
@ -1807,7 +1807,7 @@ class WC_Cart {
|
|||
*
|
||||
* @access private
|
||||
* @param mixed $code
|
||||
* @param mixed $amount
|
||||
* @param double $amount
|
||||
*/
|
||||
private function increase_coupon_discount_amount( $code, $amount ) {
|
||||
if ( empty( $this->coupon_discount_amounts[ $code ] ) )
|
||||
|
@ -1821,7 +1821,7 @@ class WC_Cart {
|
|||
*
|
||||
* @access private
|
||||
* @param mixed $code
|
||||
* @param mixed $amount
|
||||
* @param mixed $count
|
||||
*/
|
||||
private function increase_coupon_applied_count( $code, $count = 1 ) {
|
||||
if ( empty( $this->coupon_applied_count[ $code ] ) )
|
||||
|
|
|
@ -252,7 +252,7 @@ class WC_Countries {
|
|||
* Gets an array of countries in the EU.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
* @return string[]
|
||||
*/
|
||||
public function get_european_union_countries() {
|
||||
return array( 'AT', 'BE', 'BG', 'CY', 'CZ', 'DE', 'DK', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'HU', 'HR', 'IE', 'IT', 'LT', 'LU', 'LV', 'MT', 'NL', 'PL', 'PT', 'RO', 'SE', 'SI', 'SK' );
|
||||
|
|
|
@ -278,7 +278,7 @@ class WC_Coupon {
|
|||
* Check if a coupon is valid. Return a reason code if invalid. Reason codes:
|
||||
*
|
||||
* @access public
|
||||
* @return bool|WP_Error validity or a WP_Error if not valid
|
||||
* @return boolean validity or a WP_Error if not valid
|
||||
*/
|
||||
public function is_valid() {
|
||||
|
||||
|
@ -599,7 +599,7 @@ class WC_Coupon {
|
|||
* Map one of the WC_Coupon message codes to a message string
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $msg_code
|
||||
* @param integer $msg_code
|
||||
* @return string| Message/error string
|
||||
*/
|
||||
public function get_coupon_message( $msg_code ) {
|
||||
|
|
|
@ -372,8 +372,8 @@ class WC_Customer {
|
|||
* Sets session data for the location.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $country
|
||||
* @param mixed $state
|
||||
* @param string $country
|
||||
* @param string $state
|
||||
* @param string $postcode (default: '')
|
||||
* @param string $city (default: '')
|
||||
*/
|
||||
|
@ -448,7 +448,7 @@ class WC_Customer {
|
|||
* Sets session data for the location.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $country
|
||||
* @param string $country
|
||||
* @param string $state (default: '')
|
||||
* @param string $postcode (default: '')
|
||||
* @param string $city (default: '')
|
||||
|
@ -534,7 +534,7 @@ class WC_Customer {
|
|||
* calculated_shipping function.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $calculated
|
||||
* @param boolean $calculated
|
||||
*/
|
||||
public function calculated_shipping( $calculated = true ) {
|
||||
$this->calculated_shipping = $calculated;
|
||||
|
|
|
@ -138,6 +138,7 @@ class WC_Download_Handler {
|
|||
|
||||
/**
|
||||
* Download a file - hook into init function.
|
||||
* @param integer $product_id
|
||||
*/
|
||||
public static function download( $file_path, $product_id ) {
|
||||
global $is_IE;
|
||||
|
|
|
@ -190,7 +190,7 @@ class WC_Emails {
|
|||
*
|
||||
* @access public
|
||||
* @param mixed $email_heading
|
||||
* @param mixed $message
|
||||
* @param string $message
|
||||
* @return string
|
||||
*/
|
||||
function wrap_message( $email_heading, $message, $plain_text = false ) {
|
||||
|
@ -244,7 +244,6 @@ class WC_Emails {
|
|||
* Prepare and send the customer invoice email on demand.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $pay_for_order
|
||||
* @return void
|
||||
*/
|
||||
function customer_invoice( $order ) {
|
||||
|
|
|
@ -69,8 +69,6 @@ class WC_HTTPS {
|
|||
/**
|
||||
* Force a post link to be SSL if needed
|
||||
*
|
||||
* @param string $post_link
|
||||
* @param object $post
|
||||
* @return string
|
||||
*/
|
||||
public static function force_https_page_link( $link, $page_id ) {
|
||||
|
|
|
@ -75,7 +75,7 @@ class WC_Order extends WC_Abstract_Order {
|
|||
*
|
||||
* @param int $item_id ID of the item we're checking
|
||||
* @param string $item_type type of the item we're checking, if not a line_item
|
||||
* @return float|int
|
||||
* @return integer
|
||||
*/
|
||||
public function get_qty_refunded_for_item( $item_id, $item_type = 'line_item' ) {
|
||||
$qty = 0;
|
||||
|
@ -94,7 +94,7 @@ class WC_Order extends WC_Abstract_Order {
|
|||
*
|
||||
* @param int $item_id ID of the item we're checking
|
||||
* @param string $item_type type of the item we're checking, if not a line_item
|
||||
* @return float|int
|
||||
* @return integer
|
||||
*/
|
||||
public function get_total_refunded_for_item( $item_id, $item_type = 'line_item' ) {
|
||||
$total = 0;
|
||||
|
@ -121,7 +121,7 @@ class WC_Order extends WC_Abstract_Order {
|
|||
* @param int $item_id ID of the item we're checking
|
||||
* @param int $tax_id ID of the tax we're checking
|
||||
* @param string $item_type type of the item we're checking, if not a line_item
|
||||
* @return float|int
|
||||
* @return integer
|
||||
*/
|
||||
public function get_tax_refunded_for_item( $item_id, $tax_id, $item_type = 'line_item' ) {
|
||||
$total = 0;
|
||||
|
|
|
@ -66,7 +66,7 @@ class WC_Product_Variation extends WC_Product {
|
|||
* Loads required variation data.
|
||||
*
|
||||
* @access public
|
||||
* @param int $variation_id ID of the variation to load
|
||||
* @param int $variation ID of the variation to load
|
||||
* @param array $args Array of the arguments containing parent product data
|
||||
*/
|
||||
public function __construct( $variation, $args = array() ) {
|
||||
|
@ -629,7 +629,6 @@ class WC_Product_Variation extends WC_Product {
|
|||
* Get product name with extra details such as SKU, price and attributes. Used within admin.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $product
|
||||
* @return string Formatted product name, including attributes and price
|
||||
*/
|
||||
public function get_formatted_name() {
|
||||
|
|
|
@ -188,6 +188,10 @@ class Mijireh_Order extends Mijireh_Model {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @param integer $value
|
||||
*/
|
||||
public function add_meta_data($key, $value) {
|
||||
if(!is_array($this->_data['meta_data'])) {
|
||||
$this->_data['meta_data'] = array();
|
||||
|
@ -199,6 +203,7 @@ class Mijireh_Order extends Mijireh_Model {
|
|||
* Return the value associated with the given key in the order's meta data.
|
||||
*
|
||||
* If the key does not exist, return false.
|
||||
* @param string $key
|
||||
*/
|
||||
public function get_meta_value($key) {
|
||||
$value = false;
|
||||
|
|
|
@ -50,6 +50,10 @@ class Mijireh_Rest {
|
|||
}
|
||||
|
||||
// $auth can be 'basic' or 'digest'
|
||||
|
||||
/**
|
||||
* @param string $pass
|
||||
*/
|
||||
public function setupAuth($user, $pass, $auth = 'basic') {
|
||||
$this->curl_opts[CURLOPT_HTTPAUTH] = constant('CURLAUTH_'.strtoupper($auth));
|
||||
$this->curl_opts[CURLOPT_USERPWD] = $user . ":" . $pass;
|
||||
|
@ -64,6 +68,9 @@ class Mijireh_Rest {
|
|||
return $body;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $data
|
||||
*/
|
||||
public function post($url, $data, $headers=array()) {
|
||||
$data = (is_array($data)) ? http_build_query($data) : $data;
|
||||
|
||||
|
@ -81,6 +88,9 @@ class Mijireh_Rest {
|
|||
return $body;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $data
|
||||
*/
|
||||
public function put($url, $data, $headers=array()) {
|
||||
$data = (is_array($data)) ? http_build_query($data) : $data;
|
||||
|
||||
|
@ -125,6 +135,9 @@ class Mijireh_Rest {
|
|||
return $body;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
protected function processError($body) {
|
||||
// Override this in classes that extend Mijireh_Rest.
|
||||
// The body of every erroneous (non-2xx/3xx) GET/POST/PUT/DELETE
|
||||
|
@ -159,6 +172,9 @@ class Mijireh_Rest {
|
|||
return $curl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param resource $curl
|
||||
*/
|
||||
private function doRequest($curl) {
|
||||
|
||||
$body = curl_exec($curl);
|
||||
|
|
|
@ -4,6 +4,9 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||
|
||||
class Mijireh_RestJSON extends Mijireh_Rest {
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
*/
|
||||
public function post($url, $data, $headers=array()) {
|
||||
return parent::post($url, json_encode($data), $headers);
|
||||
}
|
||||
|
|
|
@ -216,7 +216,7 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce {
|
|||
* process_subscription_payment function.
|
||||
*
|
||||
* @param WC_order $order
|
||||
* @param float $amount (default: 0)
|
||||
* @param integer $amount (default: 0)
|
||||
* @return bool|WP_Error
|
||||
*/
|
||||
public function process_subscription_payment( $order = '', $amount = 0 ) {
|
||||
|
@ -318,7 +318,7 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce {
|
|||
* Process a pre-order payment when the pre-order is released
|
||||
*
|
||||
* @param WC_Order $order
|
||||
* @return void
|
||||
* @return wp_error|null
|
||||
*/
|
||||
public function process_pre_order_release_payment( $order ) {
|
||||
|
||||
|
|
|
@ -265,6 +265,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway {
|
|||
|
||||
/**
|
||||
* Process the payment
|
||||
* @param integer $order_id
|
||||
*/
|
||||
public function process_payment( $order_id ) {
|
||||
$order = new WC_Order( $order_id );
|
||||
|
|
|
@ -104,6 +104,11 @@ class Simplify_AccessToken extends Simplify_Object {
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $props
|
||||
* @param string $context
|
||||
* @param Simplify_Authentication $authentication
|
||||
*/
|
||||
private static function sendRequest($props, $context, $authentication){
|
||||
|
||||
$url = Simplify_Constants::OAUTH_BASE_URL.'/'.$context;
|
||||
|
|
|
@ -37,7 +37,7 @@ class Simplify_Chargeback extends Simplify_Object {
|
|||
* <dt><tt>offset</tt></dt> <dd>Used in paging of the list. This is the start offset of the page. [default: 0] </dd>
|
||||
* <dt><tt>sorting</tt></dt> <dd>Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <tt>asc</tt> for ascending or <tt>desc</tt> for descending). Sortable properties are: <tt> id</tt><tt> amount</tt><tt> description</tt><tt> dateCreated</tt>.</dd></dl>
|
||||
* @param $authentication - information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. <i>For backwards compatibility the public and private keys may be passed instead of the authentication object.</i>
|
||||
* @return ResourceList a ResourceList object that holds the list of Chargeback objects and the total
|
||||
* @return Simplify_ResourceList a ResourceList object that holds the list of Chargeback objects and the total
|
||||
* number of Chargeback objects available for the given criteria.
|
||||
* @see ResourceList
|
||||
*/
|
||||
|
|
|
@ -81,7 +81,7 @@ class Simplify_Coupon extends Simplify_Object {
|
|||
* <dt><tt>offset</tt></dt> <dd>Used in paging of the list. This is the start offset of the page. [default: 0] </dd>
|
||||
* <dt><tt>sorting</tt></dt> <dd>Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <tt>asc</tt> for ascending or <tt>desc</tt> for descending). Sortable properties are: <tt> dateCreated</tt><tt> maxRedemptions</tt><tt> timesRedeemed</tt><tt> id</tt><tt> startDate</tt><tt> endDate</tt><tt> percentOff</tt><tt> couponCode</tt><tt> durationInMonths</tt><tt> amountOff</tt>.</dd></dl>
|
||||
* @param $authentication - information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. <i>For backwards compatibility the public and private keys may be passed instead of the authentication object.</i>
|
||||
* @return ResourceList a ResourceList object that holds the list of Coupon objects and the total
|
||||
* @return Simplify_ResourceList a ResourceList object that holds the list of Coupon objects and the total
|
||||
* number of Coupon objects available for the given criteria.
|
||||
* @see ResourceList
|
||||
*/
|
||||
|
|
|
@ -97,7 +97,7 @@ class Simplify_Customer extends Simplify_Object {
|
|||
* <dt><tt>offset</tt></dt> <dd>Used in paging of the list. This is the start offset of the page. [default: 0] </dd>
|
||||
* <dt><tt>sorting</tt></dt> <dd>Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <tt>asc</tt> for ascending or <tt>desc</tt> for descending). Sortable properties are: <tt> dateCreated</tt><tt> id</tt><tt> name</tt><tt> email</tt><tt> reference</tt>.</dd></dl>
|
||||
* @param $authentication - information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. <i>For backwards compatibility the public and private keys may be passed instead of the authentication object.</i>
|
||||
* @return ResourceList a ResourceList object that holds the list of Customer objects and the total
|
||||
* @return Simplify_ResourceList a ResourceList object that holds the list of Customer objects and the total
|
||||
* number of Customer objects available for the given criteria.
|
||||
* @see ResourceList
|
||||
*/
|
||||
|
|
|
@ -37,7 +37,7 @@ class Simplify_Deposit extends Simplify_Object {
|
|||
* <dt><tt>offset</tt></dt> <dd>Used in paging of the list. This is the start offset of the page. [default: 0] </dd>
|
||||
* <dt><tt>sorting</tt></dt> <dd>Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <tt>asc</tt> for ascending or <tt>desc</tt> for descending). Sortable properties are: <tt> amount</tt><tt> dateCreated</tt><tt> depositDate</tt>.</dd></dl>
|
||||
* @param $authentication - information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. <i>For backwards compatibility the public and private keys may be passed instead of the authentication object.</i>
|
||||
* @return ResourceList a ResourceList object that holds the list of Deposit objects and the total
|
||||
* @return Simplify_ResourceList a ResourceList object that holds the list of Deposit objects and the total
|
||||
* number of Deposit objects available for the given criteria.
|
||||
* @see ResourceList
|
||||
*/
|
||||
|
|
|
@ -122,6 +122,7 @@ class Simplify_ApiConnectionException extends Simplify_ApiException {
|
|||
|
||||
/**
|
||||
* @ignore
|
||||
* @param string $message
|
||||
*/
|
||||
function __construct($message, $status = null, $errorData = null) {
|
||||
parent::__construct($message, $status, $errorData);
|
||||
|
@ -135,6 +136,7 @@ class Simplify_AuthenticationException extends Simplify_ApiException {
|
|||
|
||||
/**
|
||||
* @ignore
|
||||
* @param string $message
|
||||
*/
|
||||
function __construct($message, $status = null, $errorData = null) {
|
||||
parent::__construct($message, $status, $errorData);
|
||||
|
@ -150,6 +152,7 @@ class Simplify_BadRequestException extends Simplify_ApiException {
|
|||
|
||||
/**
|
||||
* @ignore
|
||||
* @param string $message
|
||||
*/
|
||||
function __construct($message, $status = null, $errorData = null) {
|
||||
parent::__construct($message, $status, $errorData);
|
||||
|
@ -258,6 +261,7 @@ class Simplify_ObjectNotFoundException extends Simplify_ApiException {
|
|||
|
||||
/**
|
||||
* @ignore
|
||||
* @param string $message
|
||||
*/
|
||||
function __construct($message, $status = null, $errorData = null) {
|
||||
parent::__construct($message, $status, $errorData);
|
||||
|
@ -271,6 +275,7 @@ class Simplify_NotAllowedException extends Simplify_ApiException {
|
|||
|
||||
/**
|
||||
* @ignore
|
||||
* @param string $message
|
||||
*/
|
||||
function __construct($message, $status = null, $errorData = null) {
|
||||
parent::__construct($message, $status, $errorData);
|
||||
|
@ -284,6 +289,7 @@ class Simplify_SystemException extends Simplify_ApiException {
|
|||
|
||||
/**
|
||||
* @ignore
|
||||
* @param string $message
|
||||
*/
|
||||
function __construct($message, $status = null, $errorData = null) {
|
||||
parent::__construct($message, $status, $errorData);
|
||||
|
|
|
@ -126,7 +126,7 @@ class Simplify_HTTP
|
|||
/**
|
||||
* Handles Simplify API requests
|
||||
*
|
||||
* @param $url
|
||||
* @param string $url
|
||||
* @param $method
|
||||
* @param $authentication
|
||||
* @param string $payload
|
||||
|
@ -167,7 +167,7 @@ class Simplify_HTTP
|
|||
/**
|
||||
* Handles Simplify OAuth requests
|
||||
*
|
||||
* @param $url
|
||||
* @param string $url
|
||||
* @param $payload
|
||||
* @param $authentication
|
||||
* @return mixed
|
||||
|
@ -271,6 +271,10 @@ class Simplify_HTTP
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $payload
|
||||
* @param boolean $hasPayload
|
||||
*/
|
||||
private function jwsEncode($authentication, $url, $payload, $hasPayload)
|
||||
{
|
||||
// TODO - better seeding of RNG
|
||||
|
@ -306,6 +310,9 @@ class Simplify_HTTP
|
|||
return $this->jwsUrlSafeEncode64($sig);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $header
|
||||
*/
|
||||
private function jwsVerifyHeader($header, $url, $publicKey) {
|
||||
|
||||
$hdr = json_decode($header, true);
|
||||
|
@ -359,10 +366,16 @@ class Simplify_HTTP
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $msg
|
||||
*/
|
||||
private function jwsVerifySignature($privateKey, $msg, $expectedSig) {
|
||||
return $this->jwsSign($privateKey, $msg) == $expectedSig;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $reason
|
||||
*/
|
||||
private function jwsAuthError($reason) {
|
||||
throw new Simplify_AuthenticationException("JWS authentication failure: " . $reason);
|
||||
}
|
||||
|
@ -395,6 +408,9 @@ class Simplify_HTTP
|
|||
return base64_decode(str_replace(array('-', '_'), array('+', '/'), $s));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $msg
|
||||
*/
|
||||
private function buildOauthError($msg, $error, $error_description){
|
||||
|
||||
return array(
|
||||
|
|
|
@ -37,7 +37,7 @@ class Simplify_Invoice extends Simplify_Object {
|
|||
* <dt><tt>offset</tt></dt> <dd>Used in paging of the list. This is the start offset of the page. [default: 0] </dd>
|
||||
* <dt><tt>sorting</tt></dt> <dd>Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <tt>asc</tt> for ascending or <tt>desc</tt> for descending). Sortable properties are: <tt> id</tt><tt> invoiceDate</tt><tt> customer</tt><tt> amount</tt><tt> processedDate</tt>.</dd></dl>
|
||||
* @param $authentication - information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. <i>For backwards compatibility the public and private keys may be passed instead of the authentication object.</i>
|
||||
* @return ResourceList a ResourceList object that holds the list of Invoice objects and the total
|
||||
* @return Simplify_ResourceList a ResourceList object that holds the list of Invoice objects and the total
|
||||
* number of Invoice objects available for the given criteria.
|
||||
* @see ResourceList
|
||||
*/
|
||||
|
|
|
@ -77,7 +77,7 @@ class Simplify_InvoiceItem extends Simplify_Object {
|
|||
* <dt><tt>offset</tt></dt> <dd>Used in paging of the list. This is the start offset of the page. [default: 0] </dd>
|
||||
* <dt><tt>sorting</tt></dt> <dd>Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <tt>asc</tt> for ascending or <tt>desc</tt> for descending). Sortable properties are: <tt> id</tt><tt> amount</tt><tt> description</tt><tt> invoice</tt>.</dd></dl>
|
||||
* @param $authentication - information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. <i>For backwards compatibility the public and private keys may be passed instead of the authentication object.</i>
|
||||
* @return ResourceList a ResourceList object that holds the list of InvoiceItem objects and the total
|
||||
* @return Simplify_ResourceList a ResourceList object that holds the list of InvoiceItem objects and the total
|
||||
* number of InvoiceItem objects available for the given criteria.
|
||||
* @see ResourceList
|
||||
*/
|
||||
|
|
|
@ -73,7 +73,7 @@ class Simplify_Payment extends Simplify_Object {
|
|||
* <dt><tt>offset</tt></dt> <dd>Used in paging of the list. This is the start offset of the page. [default: 0] </dd>
|
||||
* <dt><tt>sorting</tt></dt> <dd>Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <tt>asc</tt> for ascending or <tt>desc</tt> for descending). Sortable properties are: <tt> dateCreated</tt><tt> amount</tt><tt> id</tt><tt> description</tt><tt> paymentDate</tt>.</dd></dl>
|
||||
* @param $authentication - information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. <i>For backwards compatibility the public and private keys may be passed instead of the authentication object.</i>
|
||||
* @return ResourceList a ResourceList object that holds the list of Payment objects and the total
|
||||
* @return Simplify_ResourceList a ResourceList object that holds the list of Payment objects and the total
|
||||
* number of Payment objects available for the given criteria.
|
||||
* @see ResourceList
|
||||
*/
|
||||
|
|
|
@ -43,6 +43,7 @@ class Simplify_PaymentsApi
|
|||
|
||||
/**
|
||||
* @ignore
|
||||
* @param Simplify_Authentication $authentication
|
||||
*/
|
||||
static public function createObject($object, $authentication = null)
|
||||
{
|
||||
|
@ -57,6 +58,7 @@ class Simplify_PaymentsApi
|
|||
|
||||
/**
|
||||
* @ignore
|
||||
* @param Simplify_Authentication $authentication
|
||||
*/
|
||||
static public function findObject($object, $authentication = null)
|
||||
{
|
||||
|
@ -70,6 +72,7 @@ class Simplify_PaymentsApi
|
|||
|
||||
/**
|
||||
* @ignore
|
||||
* @param Simplify_Authentication $authentication
|
||||
*/
|
||||
static public function updateObject($object, $authentication = null) {
|
||||
$paymentsApi = new Simplify_PaymentsApi();
|
||||
|
@ -82,6 +85,7 @@ class Simplify_PaymentsApi
|
|||
|
||||
/**
|
||||
* @ignore
|
||||
* @param Simplify_Authentication $authentication
|
||||
*/
|
||||
static public function deleteObject($object, $authentication = null) {
|
||||
$paymentsApi = new Simplify_PaymentsApi();
|
||||
|
@ -93,6 +97,7 @@ class Simplify_PaymentsApi
|
|||
|
||||
/**
|
||||
* @ignore
|
||||
* @param Simplify_Authentication $authentication
|
||||
*/
|
||||
static public function listObject($object, $criteria = null, $authentication =null) {
|
||||
if ($criteria != null) {
|
||||
|
@ -206,6 +211,7 @@ class Simplify_PaymentsApi
|
|||
|
||||
/**
|
||||
* @ignore
|
||||
* @param string $action
|
||||
*/
|
||||
private function execute($action, $object, $authentication)
|
||||
{
|
||||
|
@ -217,6 +223,7 @@ class Simplify_PaymentsApi
|
|||
|
||||
/**
|
||||
* @ignore
|
||||
* @param Simplify_Authentication $authentication
|
||||
*/
|
||||
public function jwsDecode($hash, $authentication)
|
||||
{
|
||||
|
@ -247,6 +254,7 @@ class Simplify_PaymentsApi
|
|||
|
||||
/**
|
||||
* @ignore
|
||||
* @param string $c
|
||||
*/
|
||||
private function endsWith($s, $c)
|
||||
{
|
||||
|
@ -262,7 +270,7 @@ class Simplify_PaymentsApi
|
|||
* @ignore
|
||||
* @param $authentication
|
||||
* @param $args
|
||||
* @param $expectedArgCount
|
||||
* @param integer $expectedArgCount
|
||||
* @return Simplify_Authentication
|
||||
*/
|
||||
static function buildAuthenticationObject($authentication = null, $args, $expectedArgCount){
|
||||
|
|
|
@ -77,7 +77,7 @@ class Simplify_Plan extends Simplify_Object {
|
|||
* <dt><tt>offset</tt></dt> <dd>Used in paging of the list. This is the start offset of the page. [default: 0] </dd>
|
||||
* <dt><tt>sorting</tt></dt> <dd>Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <tt>asc</tt> for ascending or <tt>desc</tt> for descending). Sortable properties are: <tt> dateCreated</tt><tt> amount</tt><tt> frequency</tt><tt> name</tt><tt> id</tt>.</dd></dl>
|
||||
* @param $authentication - information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. <i>For backwards compatibility the public and private keys may be passed instead of the authentication object.</i>
|
||||
* @return ResourceList a ResourceList object that holds the list of Plan objects and the total
|
||||
* @return Simplify_ResourceList a ResourceList object that holds the list of Plan objects and the total
|
||||
* number of Plan objects available for the given criteria.
|
||||
* @see ResourceList
|
||||
*/
|
||||
|
|
|
@ -60,7 +60,7 @@ class Simplify_Refund extends Simplify_Object {
|
|||
* <dt><tt>offset</tt></dt> <dd>Used in paging of the list. This is the start offset of the page. [default: 0] </dd>
|
||||
* <dt><tt>sorting</tt></dt> <dd>Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <tt>asc</tt> for ascending or <tt>desc</tt> for descending). Sortable properties are: <tt> id</tt><tt> amount</tt><tt> description</tt><tt> dateCreated</tt><tt> paymentDate</tt>.</dd></dl>
|
||||
* @param $authentication - information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. <i>For backwards compatibility the public and private keys may be passed instead of the authentication object.</i>
|
||||
* @return ResourceList a ResourceList object that holds the list of Refund objects and the total
|
||||
* @return Simplify_ResourceList a ResourceList object that holds the list of Refund objects and the total
|
||||
* number of Refund objects available for the given criteria.
|
||||
* @see ResourceList
|
||||
*/
|
||||
|
|
|
@ -81,7 +81,7 @@ class Simplify_Subscription extends Simplify_Object {
|
|||
* <dt><tt>offset</tt></dt> <dd>Used in paging of the list. This is the start offset of the page. [default: 0] </dd>
|
||||
* <dt><tt>sorting</tt></dt> <dd>Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <tt>asc</tt> for ascending or <tt>desc</tt> for descending). Sortable properties are: <tt> id</tt><tt> plan</tt>.</dd></dl>
|
||||
* @param $authentication - information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. <i>For backwards compatibility the public and private keys may be passed instead of the authentication object.</i>
|
||||
* @return ResourceList a ResourceList object that holds the list of Subscription objects and the total
|
||||
* @return Simplify_ResourceList a ResourceList object that holds the list of Subscription objects and the total
|
||||
* number of Subscription objects available for the given criteria.
|
||||
* @see ResourceList
|
||||
*/
|
||||
|
|
|
@ -74,7 +74,7 @@ class Simplify_Webhook extends Simplify_Object {
|
|||
* <dt><tt>offset</tt></dt> <dd>Used in paging of the list. This is the start offset of the page. [default: 0] </dd>
|
||||
* <dt><tt>sorting</tt></dt> <dd>Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <tt>asc</tt> for ascending or <tt>desc</tt> for descending). Sortable properties are: <tt> dateCreated</tt>.</dd></dl>
|
||||
* @param $authentication - information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. <i>For backwards compatibility the public and private keys may be passed instead of the authentication object.</i>
|
||||
* @return ResourceList a ResourceList object that holds the list of Webhook objects and the total
|
||||
* @return Simplify_ResourceList a ResourceList object that holds the list of Webhook objects and the total
|
||||
* number of Webhook objects available for the given criteria.
|
||||
* @see ResourceList
|
||||
*/
|
||||
|
|
|
@ -21,7 +21,6 @@ class WC_Product_Cat_Dropdown_Walker extends Walker {
|
|||
* @since 2.1.0
|
||||
*
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
* @param object $category Category data object.
|
||||
* @param int $depth Depth of category in reference to parents.
|
||||
* @param integer $current_object_id
|
||||
*/
|
||||
|
|
|
@ -53,7 +53,6 @@ class WC_Product_Cat_List_Walker extends Walker {
|
|||
* @since 2.1.0
|
||||
*
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
* @param object $category Category data object.
|
||||
* @param int $depth Depth of category in reference to parents.
|
||||
* @param integer $current_object_id
|
||||
*/
|
||||
|
@ -84,7 +83,6 @@ class WC_Product_Cat_List_Walker extends Walker {
|
|||
* @since 2.1.0
|
||||
*
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
* @param object $page Not used.
|
||||
* @param int $depth Depth of category. Not used.
|
||||
* @param array $args Only uses 'list' for whether should append to output.
|
||||
*/
|
||||
|
|
|
@ -44,7 +44,7 @@ function wc_empty_cart() {
|
|||
* Load the cart upon login
|
||||
*
|
||||
* @param mixed $user_login
|
||||
* @param mixed $user
|
||||
* @param integer $user
|
||||
* @return void
|
||||
*/
|
||||
function wc_load_persistent_cart( $user_login, $user = 0 ) {
|
||||
|
|
|
@ -114,7 +114,7 @@ function wc_create_order( $args = array() ) {
|
|||
/**
|
||||
* Update an order. Uses wc_create_order.
|
||||
* @param array $args
|
||||
* @return WC_Error | WC_Order
|
||||
* @return string | WC_Order
|
||||
*/
|
||||
function wc_update_order( $args ) {
|
||||
if ( ! $args['order_id'] ) {
|
||||
|
@ -590,7 +590,7 @@ add_filter( 'mod_rewrite_rules', 'wc_ms_protect_download_rewite_rules' );
|
|||
* WooCommerce Core Supported Themes
|
||||
*
|
||||
* @since 2.2
|
||||
* @return array
|
||||
* @return string[]
|
||||
*/
|
||||
function wc_get_core_supported_themes() {
|
||||
return array( 'twentyfourteen', 'twentythirteen', 'twentyeleven', 'twentytwelve', 'twentyten' );
|
||||
|
|
|
@ -147,7 +147,7 @@ function wc_trim_zeros( $price ) {
|
|||
* Round a tax amount
|
||||
*
|
||||
* @param mixed $tax
|
||||
* @return string
|
||||
* @return double
|
||||
*/
|
||||
function wc_round_tax_total( $tax ) {
|
||||
$dp = (int) get_option( 'woocommerce_price_num_decimals' );
|
||||
|
|
|
@ -305,7 +305,6 @@ add_action( 'woocommerce_order_status_processing', 'wc_downloadable_product_perm
|
|||
*
|
||||
* @access public
|
||||
* @param int $order_id
|
||||
* @param array $data
|
||||
* @return mixed
|
||||
*/
|
||||
function wc_add_order_item( $order_id, $item ) {
|
||||
|
|
|
@ -39,7 +39,6 @@ function wc_get_page_id( $page ) {
|
|||
*
|
||||
* Gets the URL for an endpoint, which varies depending on permalink settings.
|
||||
*
|
||||
* @param string $page
|
||||
* @return string
|
||||
*/
|
||||
function wc_get_endpoint_url( $endpoint, $value = '', $permalink = '' ) {
|
||||
|
@ -94,7 +93,6 @@ function wc_edit_address_i18n( $id, $flip = false ) {
|
|||
* Returns the url to the lost password endpoint url
|
||||
*
|
||||
* @access public
|
||||
* @param string $url
|
||||
* @return string
|
||||
*/
|
||||
function wc_lostpassword_url() {
|
||||
|
|
|
@ -273,7 +273,7 @@ function wc_placeholder_img( $size = 'shop_thumbnail' ) {
|
|||
* Gets a formatted version of variation data or item meta
|
||||
*
|
||||
* @access public
|
||||
* @param array $variation
|
||||
* @param string $variation
|
||||
* @param bool $flat (default: false)
|
||||
* @return string
|
||||
*/
|
||||
|
|
|
@ -1403,7 +1403,7 @@ if ( ! function_exists( 'woocommerce_product_subcategories' ) ) {
|
|||
* @access public
|
||||
* @subpackage Loop
|
||||
* @param array $args
|
||||
* @return bool
|
||||
* @return null|boolean
|
||||
*/
|
||||
function woocommerce_product_subcategories( $args = array() ) {
|
||||
global $wp_query;
|
||||
|
|
|
@ -100,9 +100,7 @@ function _wc_get_product_terms_parent_usort_callback( $a, $b ) {
|
|||
* Stuck with this until a fix for http://core.trac.wordpress.org/ticket/13258
|
||||
* We use a custom walker, just like WordPress does
|
||||
*
|
||||
* @param int $show_counts (default: 1)
|
||||
* @param int $hierarchical (default: 1)
|
||||
* @param int $show_uncategorized (default: 1)
|
||||
* @param int $deprecated_show_uncategorized (default: 1)
|
||||
* @return string
|
||||
*/
|
||||
function wc_product_dropdown_categories( $args = array(), $deprecated_hierarchical = 1, $deprecated_show_uncategorized = 1, $deprecated_orderby = '' ) {
|
||||
|
@ -198,7 +196,7 @@ add_action( 'switch_blog', 'wc_taxonomy_metadata_wpdbfix', 0 );
|
|||
* WooCommerce Term Meta API - Update term meta
|
||||
*
|
||||
* @param mixed $term_id
|
||||
* @param mixed $meta_key
|
||||
* @param string $meta_key
|
||||
* @param mixed $meta_value
|
||||
* @param string $prev_value (default: '')
|
||||
* @return bool
|
||||
|
@ -237,7 +235,7 @@ function delete_woocommerce_term_meta( $term_id, $meta_key, $meta_value = '', $d
|
|||
* WooCommerce Term Meta API - Get term meta
|
||||
*
|
||||
* @param mixed $term_id
|
||||
* @param mixed $key
|
||||
* @param string $key
|
||||
* @param bool $single (default: true)
|
||||
* @return mixed
|
||||
*/
|
||||
|
|
|
@ -510,7 +510,7 @@ final class WooCommerce {
|
|||
/**
|
||||
* Return the WC API URL for a given request
|
||||
*
|
||||
* @param mixed $request
|
||||
* @param string $request
|
||||
* @param mixed $ssl (default: null)
|
||||
* @return string
|
||||
*/
|
||||
|
@ -597,7 +597,7 @@ final class WooCommerce {
|
|||
/**
|
||||
* Email Class.
|
||||
*
|
||||
* @return WC_Email
|
||||
* @return WC_Emails
|
||||
*/
|
||||
public function mailer() {
|
||||
return WC_Emails::instance();
|
||||
|
|
Loading…
Reference in New Issue