Merge pull request #10800 from frozzare/add-public-keyword-to-methods
Add `public` keyword to public various methods
This commit is contained in:
commit
af55aa8590
|
@ -200,7 +200,7 @@ class WC_Customer {
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function is_paying_customer( $user_id ) {
|
public function is_paying_customer( $user_id ) {
|
||||||
return '1' === get_user_meta( $user_id, 'paying_customer', true );
|
return '1' === get_user_meta( $user_id, 'paying_customer', true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1506,7 +1506,7 @@ class WC_Geo_IP {
|
||||||
* @param int $ipnum
|
* @param int $ipnum
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _geoip_seek_country_v6( $ipnum ) {
|
public function _geoip_seek_country_v6( $ipnum ) {
|
||||||
// arrays from unpack start with offset 1
|
// arrays from unpack start with offset 1
|
||||||
// yet another php mystery. array_merge work around
|
// yet another php mystery. array_merge work around
|
||||||
// this broken behaviour
|
// this broken behaviour
|
||||||
|
|
|
@ -42,7 +42,7 @@ class WC_Widget_Product_Search extends WC_Widget {
|
||||||
* @param array $args
|
* @param array $args
|
||||||
* @param array $instance
|
* @param array $instance
|
||||||
*/
|
*/
|
||||||
function widget( $args, $instance ) {
|
public function widget( $args, $instance ) {
|
||||||
$this->widget_start( $args, $instance );
|
$this->widget_start( $args, $instance );
|
||||||
|
|
||||||
get_product_search_form();
|
get_product_search_form();
|
||||||
|
|
|
@ -50,7 +50,7 @@ class WC_Widget_Recently_Viewed extends WC_Widget {
|
||||||
* @param array $args
|
* @param array $args
|
||||||
* @param array $instance
|
* @param array $instance
|
||||||
*/
|
*/
|
||||||
function widget( $args, $instance ) {
|
public function widget( $args, $instance ) {
|
||||||
|
|
||||||
$viewed_products = ! empty( $_COOKIE['woocommerce_recently_viewed'] ) ? (array) explode( '|', $_COOKIE['woocommerce_recently_viewed'] ) : array();
|
$viewed_products = ! empty( $_COOKIE['woocommerce_recently_viewed'] ) ? (array) explode( '|', $_COOKIE['woocommerce_recently_viewed'] ) : array();
|
||||||
$viewed_products = array_filter( array_map( 'absint', $viewed_products ) );
|
$viewed_products = array_filter( array_map( 'absint', $viewed_products ) );
|
||||||
|
|
Loading…
Reference in New Issue