Removed all "@return void"

This commit is contained in:
Claudio Sanches 2015-07-16 16:55:48 -03:00
parent 8d2a98eab1
commit 9e41552342
62 changed files with 60 additions and 304 deletions

View File

@ -205,9 +205,6 @@ abstract class WC_Payment_Gateway extends WC_Settings_API {
* Set as current gateway.
*
* Set this as the current gateway.
*
* @access public
* @return void
*/
public function set_current() {
$this->chosen = true;

View File

@ -274,7 +274,6 @@ class WC_Product {
* set_stock_status function.
*
* @param string $status
* @return void
*/
public function set_stock_status( $status ) {
@ -755,7 +754,6 @@ class WC_Product {
* Set a products price dynamically.
*
* @param float $price Price to set.
* @return void
*/
public function set_price( $price ) {
$this->price = $price;
@ -765,7 +763,6 @@ class WC_Product {
* Adjust a products price dynamically.
*
* @param mixed $price
* @return void
*/
public function adjust_price( $price ) {
$this->price = $this->price + $price;

View File

@ -53,7 +53,6 @@ abstract class WC_Session {
* __unset function.
*
* @param mixed $key
* @return void
*/
public function __unset( $key ) {
if ( isset( $this->_data[ $key ] ) ) {

View File

@ -96,8 +96,6 @@ abstract class WC_Widget extends WP_Widget {
/**
* Flush the cache
*
* @return void
*/
public function flush_widget_cache() {
wp_cache_delete( apply_filters( 'woocommerce_cached_widget_id', $this->widget_id ), 'widget' );

View File

@ -299,7 +299,6 @@ class WC_API_Customers extends WC_API_Resource {
* @since 2.2
* @param int $id the customer ID
* @param array $data
* @return void
*/
protected function update_customer_data( $id, $data ) {
// Customer first name.

View File

@ -1538,7 +1538,6 @@ class WC_API_Products extends WC_API_Resource {
* @since 2.2
* @param int $id
* @param array $data
* @return void
*/
private function save_product_shipping_data( $id, $data ) {
if ( isset( $data['weight'] ) ) {
@ -1588,7 +1587,6 @@ class WC_API_Products extends WC_API_Resource {
* @param int $product_id
* @param array $downloads
* @param int $variation_id
* @return void
*/
private function save_downloadable_files( $product_id, $downloads, $variation_id = 0 ) {
$files = array();

View File

@ -299,7 +299,6 @@ class WC_API_Customers extends WC_API_Resource {
* @since 2.2
* @param int $id the customer ID
* @param array $data
* @return void
*/
protected function update_customer_data( $id, $data ) {
// Customer first name.

View File

@ -1538,7 +1538,6 @@ class WC_API_Products extends WC_API_Resource {
* @since 2.2
* @param int $id
* @param array $data
* @return void
*/
private function save_product_shipping_data( $id, $data ) {
if ( isset( $data['weight'] ) ) {
@ -1588,7 +1587,6 @@ class WC_API_Products extends WC_API_Resource {
* @param int $product_id
* @param array $downloads
* @param int $variation_id
* @return void
*/
private function save_downloadable_files( $product_id, $downloads, $variation_id = 0 ) {
$files = array();

View File

@ -1894,8 +1894,6 @@ class WC_AJAX {
/**
* Search for downloadable product variations and return json
*
* @access public
* @return void
* @see WC_AJAX::json_search_products()
*/
public static function json_search_downloadable_products_and_variations() {

View File

@ -137,9 +137,6 @@ class WC_Checkout {
/**
* Output the billing information form
*
* @access public
* @return void
*/
public function checkout_form_billing() {
wc_get_template( 'checkout/form-billing.php', array( 'checkout' => $this ) );
@ -147,9 +144,6 @@ class WC_Checkout {
/**
* Output the shipping information form
*
* @access public
* @return void
*/
public function checkout_form_shipping() {
wc_get_template( 'checkout/form-shipping.php', array( 'checkout' => $this ) );
@ -343,9 +337,6 @@ class WC_Checkout {
/**
* Process the checkout after the confirm order button is pressed
*
* @access public
* @return void
*/
public function process_checkout() {
try {

View File

@ -308,10 +308,9 @@ class WC_Countries {
/**
* Outputs the list of countries and states for use in dropdown boxes.
* @param string $selected_country (default: '')
* @param string $selected_state (default: '')
* @param bool $escape (default: false)
* @return void
* @param string $selected_country (default: '')
* @param string $selected_state (default: '')
* @param bool $escape (default: false)
*/
public function country_dropdown_options( $selected_country = '', $selected_state = '', $escape = false ) {
if ( $this->countries ) foreach ( $this->countries as $key => $value ) :
@ -320,14 +319,18 @@ class WC_Countries {
foreach ( $states as $state_key => $state_value ) :
echo '<option value="' . esc_attr( $key ) . ':' . $state_key . '"';
if ( $selected_country == $key && $selected_state == $state_key ) echo ' selected="selected"';
if ( $selected_country == $key && $selected_state == $state_key ) {
echo ' selected="selected"';
}
echo '>' . $value . ' &mdash; ' . ( $escape ? esc_js( $state_value ) : $state_value ) . '</option>';
endforeach;
echo '</optgroup>';
else :
echo '<option';
if ( $selected_country == $key && $selected_state == '*' ) echo ' selected="selected"';
if ( $selected_country == $key && $selected_state == '*' ) {
echo ' selected="selected"';
}
echo ' value="' . esc_attr( $key ) . '">' . ( $escape ? esc_js( $value ) : $value ) . '</option>';
endif;
endforeach;

View File

@ -247,9 +247,7 @@ class WC_Coupon {
/**
* Increase usage count for current coupon.
*
* @access public
* @param string $used_by Either user ID or billing email
* @return void
* @param string $used_by Either user ID or billing email
*/
public function inc_usage_count( $used_by = '' ) {
if ( $this->id ) {
@ -265,9 +263,7 @@ class WC_Coupon {
/**
* Decrease usage count for current coupon.
*
* @access public
* @param string $used_by Either user ID or billing email
* @return void
* @param string $used_by Either user ID or billing email
*/
public function dcr_usage_count( $used_by = '' ) {
if ( $this->id ) {

View File

@ -367,8 +367,6 @@ class WC_Emails {
/**
* Get the email addresses.
*
* @return void
*/
public function email_addresses( $order, $sent_to_admin = false, $plain_text = false ) {
if ( $plain_text ) {

View File

@ -302,8 +302,6 @@ class WC_Install {
* woocommerce_order_itemmeta - Order line item meta is stored in a table for storing extra data.
* woocommerce_tax_rates - Tax Rates are stored inside 2 tables making tax queries simple and efficient.
* woocommerce_tax_rate_locations - Each rate can be applied to more than one postcode/city hence the second table.
*
* @return void
*/
private static function create_tables() {
global $wpdb;

View File

@ -4,11 +4,11 @@
*
* Loads Integrations into WooCommerce.
*
* @class WC_Integrations
* @version 2.3.0
* @package WooCommerce/Classes/Integrations
* @category Class
* @author WooThemes
* @class WC_Integrations
* @version 2.3.0
* @package WooCommerce/Classes/Integrations
* @category Class
* @author WooThemes
*/
class WC_Integrations {
@ -16,10 +16,7 @@ class WC_Integrations {
public $integrations = array();
/**
* __construct function.
*
* @access public
* @return void
* Initialize integrations.
*/
public function __construct() {
@ -34,7 +31,6 @@ class WC_Integrations {
$this->integrations[ $load_integration->id ] = $load_integration;
}
}
/**

View File

@ -113,8 +113,6 @@ class WC_Language_Pack_Upgrader {
/**
* Configure the WooCommerce translation upgrade notice
*
* @return void
*/
public function configure_woocommerce_upgrade_notice() {
WC_Admin_Notices::add_notice( 'translation_upgrade' );
@ -156,8 +154,6 @@ class WC_Language_Pack_Upgrader {
/**
* Save language version
*
* @return void
*/
protected function save_language_version() {
// Update the language pack version
@ -171,8 +167,6 @@ class WC_Language_Pack_Upgrader {
/**
* Manual language update
*
* @return void
*/
public function manual_language_update() {
if (

View File

@ -18,9 +18,6 @@ class WC_Logger {
/**
* Constructor for the logger.
*
* @access public
* @return void
*/
public function __construct() {
$this->_handles = array();
@ -29,9 +26,6 @@ class WC_Logger {
/**
* Destructor.
*
* @access public
* @return void
*/
public function __destruct() {
foreach ( $this->_handles as $handle ) {
@ -63,17 +57,15 @@ class WC_Logger {
/**
* Add a log entry to chosen file.
*
* @access public
* @param string $handle
* @param string $message
* @return void
*/
public function add( $handle, $message ) {
if ( $this->open( $handle ) && is_resource( $this->_handles[ $handle ] ) ) {
$time = date_i18n( 'm-d-Y @ H:i:s -' ); // Grab Time
@fwrite( $this->_handles[ $handle ], $time . " " . $message . "\n" );
}
do_action( 'woocommerce_log_add', $handle, $message );
}
@ -81,15 +73,13 @@ class WC_Logger {
/**
* Clear entries from chosen file.
*
* @access public
* @param mixed $handle
* @return void
*/
public function clear( $handle ) {
if ( $this->open( $handle ) && is_resource( $this->_handles[ $handle ] ) ) {
@ftruncate( $this->_handles[ $handle ], 0 );
}
do_action( 'woocommerce_log_clear', $handle );
}

View File

@ -65,9 +65,7 @@ class WC_Order_Refund extends WC_Abstract_Order {
/**
* Populates an refund from the loaded post data
*
* @since 2.2
* @param mixed $result
* @return void
*/
public function populate( $result ) {
// Standard post data
@ -96,7 +94,7 @@ class WC_Order_Refund extends WC_Abstract_Order {
public function get_formatted_refund_amount() {
return apply_filters( 'woocommerce_formatted_refund_amount', wc_price( $this->refund_amount, array('currency' => $this->get_order_currency()) ), $this );
}
/**
* Get refunded amount

View File

@ -56,10 +56,7 @@ class WC_Payment_Gateways {
}
/**
* __construct function.
*
* @access public
* @return void
* Initialize payment gateways.
*/
public function __construct() {
$this->init();
@ -67,9 +64,6 @@ class WC_Payment_Gateways {
/**
* Load gateways and hook in functions.
*
* @access public
* @return void
*/
public function init() {
$load_gateways = array(
@ -167,9 +161,6 @@ class WC_Payment_Gateways {
/**
* Save options in admin.
*
* @access public
* @return void
*/
public function process_admin_options() {

View File

@ -18,9 +18,8 @@ if ( ! defined( 'ABSPATH' ) ) {
class WC_Product_Simple extends WC_Product {
/**
* __construct function.
* Initialize simple product.
*
* @access public
* @param mixed $product
*/
public function __construct( $product ) {
@ -31,7 +30,6 @@ class WC_Product_Simple extends WC_Product {
/**
* Get the add to url used mainly in loops.
*
* @access public
* @return string
*/
public function add_to_cart_url() {
@ -43,7 +41,6 @@ class WC_Product_Simple extends WC_Product {
/**
* Get the add to cart button text
*
* @access public
* @return string
*/
public function add_to_cart_text() {
@ -55,7 +52,6 @@ class WC_Product_Simple extends WC_Product {
/**
* Get the title of the post.
*
* @access public
* @return string
*/
public function get_title() {
@ -71,9 +67,6 @@ class WC_Product_Simple extends WC_Product {
/**
* Sync grouped products with the children lowest price (so they can be sorted by price accurately).
*
* @access public
* @return void
*/
public function grouped_product_sync() {
if ( ! $this->get_parent() ) return;

View File

@ -110,10 +110,7 @@ class WC_Product_Variable extends WC_Product {
}
/**
* set_stock_status function.
*
* @access public
* @return void
* Set stock status.
*/
public function set_stock_status( $status ) {
$status = 'outofstock' === $status ? 'outofstock' : 'instock';

View File

@ -203,9 +203,7 @@ class WC_Query {
/**
* Hook into pre_get_posts to do the main product query
*
* @access public
* @param mixed $q query object
* @return void
*/
public function pre_get_posts( $q ) {
// We only want to affect the main query
@ -410,9 +408,7 @@ class WC_Query {
/**
* Query the products, applying sorting/ordering etc. This applies to the main wordpress loop
*
* @access public
* @param mixed $q
* @return void
*/
public function product_query( $q ) {
@ -450,9 +446,6 @@ class WC_Query {
/**
* Remove the query
*
* @access public
* @return void
*/
public function remove_product_query() {
remove_action( 'pre_get_posts', array( $this, 'pre_get_posts' ) );
@ -468,9 +461,6 @@ class WC_Query {
/**
* Remove the posts_where filter
*
* @access public
* @return void
*/
public function remove_posts_where() {
remove_filter( 'posts_where', array( $this, 'search_post_excerpt' ) );
@ -479,9 +469,6 @@ class WC_Query {
/**
* Get an unpaginated list all product ID's (both filtered and unfiltered). Makes use of transients.
*
* @access public
* @return void
*/
public function get_products_in_view() {
global $wp_the_query;

View File

@ -75,10 +75,7 @@ class WC_Shipping {
}
/**
* __construct function.
*
* @access public
* @return void
* Initialize shipping.
*/
public function __construct() {
$this->init();
@ -86,8 +83,6 @@ class WC_Shipping {
/**
* init function.
*
* @access public
*/
public function init() {
do_action( 'woocommerce_shipping_init' );
@ -134,9 +129,7 @@ class WC_Shipping {
/**
* Register a shipping method for use in calculations.
*
* @access public
* @param object|string $method Either the name of the method's class, or an instance of the method's class
* @return void
* @param object|string $method Either the name of the method's class, or an instance of the method's class
*/
public function register_shipping_method( $method ) {
if ( ! is_object( $method ) ) {
@ -149,21 +142,17 @@ class WC_Shipping {
}
/**
* unregister_shipping_methods function.
*
* @access public
* @return void
* Unregister shipping methods.
*/
public function unregister_shipping_methods() {
unset( $this->shipping_methods );
}
/**
* sort_shipping_methods function.
* Sort shipping methods.
*
* Sorts shipping methods into the user defined order.
*
* @access public
* @return array
*/
public function sort_shipping_methods() {
@ -398,6 +387,7 @@ class WC_Shipping {
/**
* Get packages
*
* @return array
*/
public function get_packages() {
@ -405,12 +395,9 @@ class WC_Shipping {
}
/**
* reset_shipping function.
* Reset shipping.
*
* Reset the totals for shipping as a whole.
*
* @access public
* @return void
*/
public function reset_shipping() {
unset( WC()->session->chosen_shipping_methods );
@ -420,7 +407,7 @@ class WC_Shipping {
}
/**
* process_admin_options function.
* Process admin options.
*
* Saves options on the shipping setting page.
*/

View File

@ -33,8 +33,8 @@ class WC_Tracker {
/**
* Decide whether to send tracking data or not
* @param boolean $override
* @return void
*
* @param boolean $override
*/
public static function send_tracking_data( $override = false ) {
// Dont trigger this on AJAX Requests

View File

@ -49,10 +49,7 @@ class WC_Email_Cancelled_Order extends WC_Email {
}
/**
* trigger function.
*
* @access public
* @return void
* Trigger.
*/
function trigger( $order_id ) {
@ -89,9 +86,8 @@ class WC_Email_Cancelled_Order extends WC_Email {
}
/**
* get_content_plain function.
* Get content plain.
*
* @access public
* @return string
*/
function get_content_plain() {
@ -106,10 +102,7 @@ class WC_Email_Cancelled_Order extends WC_Email {
}
/**
* Initialise Settings Form Fields
*
* @access public
* @return void
* Initialise settings form fields.
*/
function init_form_fields() {
$this->form_fields = array(

View File

@ -46,10 +46,7 @@ class WC_Email_Customer_Completed_Order extends WC_Email {
}
/**
* trigger function.
*
* @access public
* @return void
* Trigger.
*/
function trigger( $order_id ) {
@ -117,9 +114,8 @@ class WC_Email_Customer_Completed_Order extends WC_Email {
}
/**
* get_content_plain function.
* Get content plain.
*
* @access public
* @return string
*/
function get_content_plain() {
@ -134,10 +130,7 @@ class WC_Email_Customer_Completed_Order extends WC_Email {
}
/**
* Initialise Settings Form Fields
*
* @access public
* @return void
* Initialise settings form fields.
*/
function init_form_fields() {
$this->form_fields = array(

View File

@ -48,10 +48,7 @@ class WC_Email_Customer_Invoice extends WC_Email {
}
/**
* trigger function.
*
* @access public
* @return void
* Trigger.
*/
function trigger( $order ) {
@ -140,10 +137,7 @@ class WC_Email_Customer_Invoice extends WC_Email {
}
/**
* Initialise Settings Form Fields
*
* @access public
* @return void
* Initialise settings form fields
*/
function init_form_fields() {
$this->form_fields = array(

View File

@ -25,9 +25,6 @@ class WC_Email_Customer_New_Account extends WC_Email {
/**
* Constructor
*
* @access public
* @return void
*/
function __construct() {
@ -46,10 +43,7 @@ class WC_Email_Customer_New_Account extends WC_Email {
}
/**
* trigger function.
*
* @access public
* @return void
* Trigger.
*/
function trigger( $user_id, $user_pass = '', $password_generated = false ) {

View File

@ -23,9 +23,6 @@ class WC_Email_Customer_Note extends WC_Email {
/**
* Constructor
*
* @access public
* @return void
*/
function __construct() {
@ -47,10 +44,7 @@ class WC_Email_Customer_Note extends WC_Email {
}
/**
* trigger function.
*
* @access public
* @return void
* Trigger.
*/
function trigger( $args ) {

View File

@ -43,10 +43,7 @@ class WC_Email_Customer_Processing_Order extends WC_Email {
}
/**
* trigger function.
*
* @access public
* @return void
* Trigger.
*/
function trigger( $order_id ) {

View File

@ -65,10 +65,7 @@ class WC_Email_Customer_Refunded_Order extends WC_Email {
}
/**
* trigger function.
*
* @access public
* @return void
* Trigger.
*/
function trigger( $order_id, $partial_refund = false, $refund_id = null ) {
@ -145,9 +142,8 @@ class WC_Email_Customer_Refunded_Order extends WC_Email {
}
/**
* get_content_plain function.
* Get content plain.
*
* @access public
* @return string
*/
function get_content_plain() {
@ -164,10 +160,7 @@ class WC_Email_Customer_Refunded_Order extends WC_Email {
}
/**
* Initialise Settings Form Fields
*
* @access public
* @return void
* Initialise settings form fields.
*/
function init_form_fields() {
$this->form_fields = array(

View File

@ -30,9 +30,6 @@ class WC_Email_Customer_Reset_Password extends WC_Email {
/**
* Constructor
*
* @access public
* @return void
*/
function __construct() {
@ -54,10 +51,7 @@ class WC_Email_Customer_Reset_Password extends WC_Email {
}
/**
* trigger function.
*
* @access public
* @return void
* Trigger.
*/
function trigger( $user_login = '', $reset_key = '' ) {
if ( $user_login && $reset_key ) {

View File

@ -53,10 +53,7 @@ class WC_Email_New_Order extends WC_Email {
}
/**
* trigger function.
*
* @access public
* @return void
* Trigger.
*/
function trigger( $order_id ) {
@ -112,10 +109,7 @@ class WC_Email_New_Order extends WC_Email {
}
/**
* Initialise Settings Form Fields
*
* @access public
* @return void
* Initialise settings form fields
*/
function init_form_fields() {
$this->form_fields = array(

View File

@ -237,11 +237,9 @@ class WC_Gateway_BACS extends WC_Payment_Gateway {
/**
* Add content to the WC emails.
*
* @access public
* @param WC_Order $order
* @param bool $sent_to_admin
* @param bool $plain_text
* @return void
*/
public function email_instructions( $order, $sent_to_admin, $plain_text = false ) {
@ -406,4 +404,4 @@ class WC_Gateway_BACS extends WC_Payment_Gateway {
return $this->locale;
}
}
}

View File

@ -335,7 +335,6 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce {
* @param float $amount_to_charge The amount to charge.
* @param WC_Order $order The WC_Order object of the order which the subscription was purchased in.
* @param int $product_id The ID of the subscription product for which this payment relates.
* @return void
*/
public function scheduled_subscription_payment( $amount_to_charge, $order, $product_id ) {
$result = $this->process_subscription_payment( $order, $amount_to_charge );
@ -371,7 +370,6 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce {
* @param WC_Order $original_order The original order in which the subscription was purchased.
* @param WC_Order $renewal_order The order which recorded the successful payment (to make up for the failed automatic payment).
* @param string $subscription_key A subscription key of the form created by @see WC_Subscriptions_Manager::get_subscription_key()
* @return void
*/
public function update_failing_payment_method( $original_order, $renewal_order, $subscription_key ) {
$new_customer_id = get_post_meta( $renewal_order->id, '_simplify_customer_id', true );

View File

@ -67,8 +67,6 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway {
/**
* Init Simplify SDK.
*
* @return void
*/
protected function init_simplify_sdk() {
// Include lib
@ -82,9 +80,6 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway {
/**
* Admin Panel Options
* - Options for bits like 'title' and availability on a country-by-country basis
*
* @access public
* @return void
*/
public function admin_options() {
?>

View File

@ -137,8 +137,6 @@ class Emogrifier {
* Sets the HTML to emogrify.
*
* @param string $html the HTML to emogrify, must be UTF-8-encoded
*
* @return void
*/
public function setHtml($html = '') {
$this->html = $html;
@ -148,8 +146,6 @@ class Emogrifier {
* Sets the CSS to merge with the HTML.
*
* @param string $css the CSS to merge, must be UTF-8-encoded
*
* @return void
*/
public function setCss($css = '') {
$this->css = $css;
@ -157,8 +153,6 @@ class Emogrifier {
/**
* Clears all caches.
*
* @return void
*/
private function clearAllCaches() {
$this->clearCache(self::CACHE_KEY_CSS);
@ -172,8 +166,6 @@ class Emogrifier {
*
* @param integer $key the cache key, must be CACHE_KEY_CSS, CACHE_KEY_SELECTOR, CACHE_KEY_XPATH or CACHE_KEY_CSS_DECLARATION_BLOCK
*
* @return void
*
* @throws InvalidArgumentException
*/
private function clearCache($key) {
@ -187,8 +179,6 @@ class Emogrifier {
/**
* Purges the visited nodes.
*
* @return void
*/
private function purgeVisitedNodes() {
$this->visitedNodes = array();
@ -204,8 +194,6 @@ class Emogrifier {
* Note: The tags will not be removed if they have any content.
*
* @param string $tagName the tag name, e.g., "p"
*
* @return void
*/
public function addUnprocessableHtmlTag($tagName) {
$this->unprocessableHtmlTags[] = $tagName;
@ -215,8 +203,6 @@ class Emogrifier {
* Drops a tag from the removal list.
*
* @param string $tagName the tag name, e.g., "p"
*
* @return void
*/
public function removeUnprocessableHtmlTag($tagName) {
$key = array_search($tagName, $this->unprocessableHtmlTags, true);
@ -391,7 +377,6 @@ class Emogrifier {
*
* @param array $cssParts
* @param DOMDocument $xmlDocument
* @return void
*/
public function copyCssWithMediaToStyleNode(array $cssParts, DOMDocument $xmlDocument) {
if (isset($cssParts['media']) && $cssParts['media'] !== '') {
@ -427,7 +412,6 @@ class Emogrifier {
*
* @param DOMDocument $document
* @param string $css
* @return void
*/
private function addStyleElementToDocument(DOMDocument $document, $css) {
$styleElement = $document->createElement('style', $css);

View File

@ -33,8 +33,6 @@ class WC_Shipping_Free_Shipping extends WC_Shipping_Method {
/**
* init function.
*
* @return void
*/
public function init() {

View File

@ -26,10 +26,7 @@ class WC_Shipping_International_Delivery extends WC_Shipping_Flat_Rate {
}
/**
* Initialise Gateway Settings Form Fields
*
* @access public
* @return void
* Initialise settings form fields
*/
public function init_form_fields() {
parent::init_form_fields();

View File

@ -81,10 +81,7 @@ class WC_Shipping_Local_Delivery extends WC_Shipping_Local_Pickup {
}
/**
* init_form_fields function.
*
* @access public
* @return void
* Init form fields.
*/
public function init_form_fields() {
$this->form_fields = array(

View File

@ -14,7 +14,6 @@ class WC_Shortcode_Checkout {
/**
* Get the shortcode content.
*
* @access public
* @param array $atts
* @return string
*/
@ -25,9 +24,7 @@ class WC_Shortcode_Checkout {
/**
* Output the shortcode.
*
* @access public
* @param array $atts
* @return void
*/
public static function output( $atts ) {
global $wp;

View File

@ -14,7 +14,6 @@ class WC_Shortcode_My_Account {
/**
* Get the shortcode content.
*
* @access public
* @param array $atts
* @return string
*/
@ -25,9 +24,7 @@ class WC_Shortcode_My_Account {
/**
* Output the shortcode.
*
* @access public
* @param array $atts
* @return void
*/
public static function output( $atts ) {
global $wp;
@ -335,10 +332,8 @@ class WC_Shortcode_My_Account {
/**
* Handles resetting the user's password.
*
* @access public
* @param object $user The user
* @param string $new_pass New password for the user in plaintext
* @return void
*/
public static function reset_password( $user, $new_pass ) {
do_action( 'password_reset', $user, $new_pass );

View File

@ -14,7 +14,6 @@ class WC_Shortcode_Order_Tracking {
/**
* Get the shortcode content.
*
* @access public
* @param array $atts
* @return string
*/
@ -25,9 +24,7 @@ class WC_Shortcode_Order_Tracking {
/**
* Output the shortcode.
*
* @access public
* @param array $atts
* @return void
*/
public static function output( $atts ) {

View File

@ -113,7 +113,6 @@ function wc_format_list_of_items( $items ) {
* Clear cart after payment.
*
* @access public
* @return void
*/
function wc_clear_cart_after_payment() {
global $wp;
@ -159,7 +158,6 @@ function wc_cart_totals_subtotal_html() {
* Get shipping methods
*
* @access public
* @return void
*/
function wc_cart_totals_shipping_html() {
$packages = WC()->shipping->get_packages();
@ -175,7 +173,6 @@ function wc_cart_totals_shipping_html() {
* Get taxes total
*
* @access public
* @return void
*/
function wc_cart_totals_taxes_total_html() {
echo apply_filters( 'woocommerce_cart_totals_taxes_total_html', wc_price( WC()->cart->get_taxes_total() ) );
@ -186,7 +183,6 @@ function wc_cart_totals_taxes_total_html() {
*
* @access public
* @param string $coupon
* @return void
*/
function wc_cart_totals_coupon_label( $coupon ) {
if ( is_string( $coupon ) )
@ -200,7 +196,6 @@ function wc_cart_totals_coupon_label( $coupon ) {
*
* @access public
* @param string $coupon
* @return void
*/
function wc_cart_totals_coupon_html( $coupon ) {
if ( is_string( $coupon ) ) {
@ -232,7 +227,6 @@ function wc_cart_totals_coupon_html( $coupon ) {
* Get order total html including inc tax if needed
*
* @access public
* @return void
*/
function wc_cart_totals_order_total_html() {
$value = '<strong>' . WC()->cart->get_total() . '</strong> ';
@ -260,7 +254,6 @@ function wc_cart_totals_order_total_html() {
* Get the fee value
*
* @param object $fee
* @return void
*/
function wc_cart_totals_fee_html( $fee ) {
$cart_totals_fee_html = ( 'excl' == WC()->cart->tax_display_cart ) ? wc_price( $fee->amount ) : wc_price( $fee->amount + $fee->tax );

View File

@ -137,7 +137,6 @@ function wc_update_order( $args ) {
* @access public
* @param mixed $slug
* @param string $name (default: '')
* @return void
*/
function wc_get_template_part( $slug, $name = '' ) {
$template = '';
@ -175,7 +174,6 @@ function wc_get_template_part( $slug, $name = '' ) {
* @param array $args (default: array())
* @param string $template_path (default: '')
* @param string $default_path (default: '')
* @return void
*/
function wc_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) {
if ( $args && is_array( $args ) ) {

View File

@ -90,7 +90,6 @@ function woocommerce_get_formatted_product_name( $product ) {
* Handle IPN requests for the legacy paypal gateway by calling gateways manually if needed.
*
* @access public
* @return void
*/
function woocommerce_legacy_paypal_ipn() {
if ( ! empty( $_GET['paypalListener'] ) && $_GET['paypalListener'] == 'paypal_standard_IPN' ) {
@ -671,7 +670,6 @@ function woocommerce_track_product_view() {
*
* @since 2.2
* @param WP_Query $q
* @return void
*/
function wc_shop_order_status_backwards_compatibility( $q ) {
if ( $q->is_main_query() ) {
@ -719,7 +717,6 @@ add_action( 'pre_get_posts', 'wc_shop_order_status_backwards_compatibility' );
/**
* @since 2.3
* @deprecated has no replacement
* @return void
*/
function woocommerce_compile_less_styles() {
_deprecated_function( 'woocommerce_compile_less_styles', '2.3' );

View File

@ -300,7 +300,6 @@ function wc_downloadable_file_permission( $download_id, $product_id, $order, $qt
*
* @access public
* @param int $order_id
* @return void
*/
function wc_downloadable_product_permissions( $order_id ) {
if ( get_post_meta( $order_id, '_download_permissions_granted', true ) == 1 ) {
@ -482,7 +481,6 @@ function wc_get_order_item_meta( $item_id, $key, $single = true ) {
* Cancel all unpaid orders after held duration to prevent stock lock for those products
*
* @access public
* @return void
*/
function wc_cancel_unpaid_orders() {
global $wpdb;
@ -721,11 +719,11 @@ function wc_create_refund( $args = array() ) {
// Figure out if this is just a partial refund
$max_remaining_refund = wc_format_decimal( $order->get_total() - $order->get_total_refunded() );
if ( $max_remaining_refund > 0 ) {
do_action( 'woocommerce_order_partially_refunded', $args['order_id'], true, $refund_id );
}
do_action( 'woocommerce_refund_created', $refund_id, $args );
}

View File

@ -341,7 +341,6 @@ function wc_get_formatted_variation( $variation, $flat = false ) {
* Function which handles the start and end of scheduled sales via cron.
*
* @access public
* @return void
*/
function wc_scheduled_sales() {
global $wpdb;

View File

@ -16,8 +16,6 @@ if ( ! defined( 'ABSPATH' ) ) {
/**
* Handle redirects before content is output - hooked into template_redirect so is_page works.
*
* @return void
*/
function wc_template_redirect() {
global $wp_query, $wp;
@ -123,7 +121,6 @@ add_filter( 'loop_end', 'woocommerce_reset_loop' );
* Products RSS Feed.
*
* @access public
* @return void
*/
function wc_products_rss_feed() {
// Product RSS
@ -156,7 +153,6 @@ function wc_products_rss_feed() {
* Output generator tag to aid debugging.
*
* @access public
* @return void
*/
function wc_generator_tag( $gen, $type ) {
switch ( $type ) {
@ -428,7 +424,7 @@ if ( ! function_exists( 'woocommerce_demo_store' ) ) {
}
$notice = get_option( 'woocommerce_demo_store_notice' );
if ( empty( $notice ) ) {
$notice = __( 'This is a demo store for testing purposes &mdash; no orders shall be fulfilled.', 'woocommerce' );
}

View File

@ -198,8 +198,6 @@ function wc_walk_category_dropdown_tree() {
/**
* WooCommerce Term/Order item Meta API - set table name
*
* @return void
*/
function wc_taxonomy_metadata_wpdbfix() {
global $wpdb;
@ -458,11 +456,11 @@ add_filter( 'terms_clauses', 'wc_terms_clauses', 10, 3 );
/**
* Function for recounting product terms, ignoring hidden products.
*
* @param array $terms
* @param string $taxonomy
* @param boolean $callback
* @param boolean $terms_are_term_taxonomy_ids
* @return void
*/
function _wc_term_recount( $terms, $taxonomy, $callback = true, $terms_are_term_taxonomy_ids = true ) {
global $wpdb;
@ -554,8 +552,8 @@ function _wc_term_recount( $terms, $taxonomy, $callback = true, $terms_are_term_
/**
* Recount terms after the stock amount changes
* @param int $product_id
* @return void
*
* @param int $product_id
*/
function wc_recount_after_stock_change( $product_id ) {
if ( get_option( 'woocommerce_hide_out_of_stock_items' ) != 'yes' )

View File

@ -120,8 +120,7 @@ function wc_create_new_customer( $email, $username = '', $password = '' ) {
/**
* Login a customer (set auth cookie and set global user object)
*
* @param int $customer_id
* @return void
* @param int $customer_id
*/
function wc_set_customer_auth_cookie( $customer_id ) {
global $current_user;
@ -188,7 +187,6 @@ function wc_update_new_customer_past_orders( $customer_id ) {
*
* @access public
* @param int $order_id
* @return void
*/
function wc_paying_customer( $order_id ) {
$order = wc_get_order( $order_id );

View File

@ -48,8 +48,6 @@ class WC_Widget_Cart extends WC_Widget {
*
* @param array $args
* @param array $instance
*
* @return void
*/
public function widget( $args, $instance ) {
if ( is_cart() || is_checkout() ) {

View File

@ -41,8 +41,6 @@ class WC_Widget_Layered_Nav_Filters extends WC_Widget {
*
* @param array $args
* @param array $instance
*
* @return void
*/
public function widget( $args, $instance ) {
global $_chosen_attributes;

View File

@ -49,8 +49,6 @@ class WC_Widget_Layered_Nav extends WC_Widget {
* @see WP_Widget->form
*
* @param array $instance
*
* @return void
*/
public function form( $instance ) {
$this->init_settings();
@ -60,8 +58,6 @@ class WC_Widget_Layered_Nav extends WC_Widget {
/**
* Init settings after post types are registered
*
* @return void
*/
public function init_settings() {
$attribute_array = array();
@ -115,8 +111,6 @@ class WC_Widget_Layered_Nav extends WC_Widget {
*
* @param array $args
* @param array $instance
*
* @return void
*/
public function widget( $args, $instance ) {
global $_chosen_attributes;

View File

@ -43,8 +43,6 @@ class WC_Widget_Price_Filter extends WC_Widget {
*
* @param array $args
* @param array $instance
*
* @return void
*/
public function widget( $args, $instance ) {
global $_chosen_attributes, $wpdb, $wp;

View File

@ -84,8 +84,6 @@ class WC_Widget_Product_Categories extends WC_Widget {
*
* @param array $args
* @param array $instance
*
* @return void
*/
public function widget( $args, $instance ) {
global $wp_query, $post;

View File

@ -41,8 +41,6 @@ class WC_Widget_Product_Search extends WC_Widget {
*
* @param array $args
* @param array $instance
*
* @return void
*/
function widget( $args, $instance ) {
$this->widget_start( $args, $instance );

View File

@ -41,8 +41,6 @@ class WC_Widget_Product_Tag_Cloud extends WC_Widget {
*
* @param array $args
* @param array $instance
*
* @return void
*/
public function widget( $args, $instance ) {
$current_taxonomy = $this->_get_current_taxonomy( $instance );

View File

@ -157,10 +157,9 @@ class WC_Widget_Products extends WC_Widget {
* widget function.
*
* @see WP_Widget
* @access public
*
* @param array $args
* @param array $instance
* @return void
*/
public function widget( $args, $instance ) {
if ( $this->get_cached_widget( $args ) ) {

View File

@ -49,8 +49,6 @@ class WC_Widget_Recent_Reviews extends WC_Widget {
*
* @param array $args
* @param array $instance
*
* @return void
*/
public function widget( $args, $instance ) {
global $comments, $comment;

View File

@ -49,8 +49,6 @@ class WC_Widget_Recently_Viewed extends WC_Widget {
*
* @param array $args
* @param array $instance
*
* @return void
*/
function widget( $args, $instance ) {

View File

@ -51,8 +51,6 @@ class WC_Widget_Top_Rated_Products extends WC_Widget {
*
* @param array $args
* @param array $instance
*
* @return void
*/
public function widget( $args, $instance ) {