commit
dec8fbd752
|
@ -125,7 +125,6 @@ abstract class WC_Email extends WC_Settings_API {
|
|||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function __construct() {
|
||||
|
||||
|
@ -270,11 +269,12 @@ abstract class WC_Email extends WC_Settings_API {
|
|||
}
|
||||
|
||||
/**
|
||||
* Proxy to parent's get_option and attempt to localize the result using gettext.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
* Proxy to parent's get_option and attempt to localize the result using gettext.
|
||||
* @access public
|
||||
* @param string $key
|
||||
* @param mixed $empty_value
|
||||
* @return string
|
||||
*/
|
||||
function get_option( $key, $empty_value = null ) {
|
||||
return __( parent::get_option( $key, $empty_value ) );
|
||||
}
|
||||
|
@ -324,6 +324,7 @@ abstract class WC_Email extends WC_Settings_API {
|
|||
* style_inline_tags function.
|
||||
*
|
||||
* @access public
|
||||
* @param array $tags
|
||||
* @return array
|
||||
*/
|
||||
function style_inline_tags($tags) {
|
||||
|
@ -332,8 +333,8 @@ abstract class WC_Email extends WC_Settings_API {
|
|||
|
||||
/**
|
||||
* style_inline_h1_tag function.
|
||||
*
|
||||
* @access public
|
||||
* @param array $styles
|
||||
* @return array
|
||||
*/
|
||||
function style_inline_h1_tag($styles) {
|
||||
|
@ -354,8 +355,8 @@ abstract class WC_Email extends WC_Settings_API {
|
|||
|
||||
/**
|
||||
* style_inline_h2_tag function.
|
||||
*
|
||||
* @access public
|
||||
* @param array $styles
|
||||
* @return array
|
||||
*/
|
||||
function style_inline_h2_tag($styles) {
|
||||
|
@ -378,6 +379,7 @@ abstract class WC_Email extends WC_Settings_API {
|
|||
* style_inline_h3_tag function.
|
||||
*
|
||||
* @access public
|
||||
* @param array $styles
|
||||
* @return array
|
||||
*/
|
||||
function style_inline_h3_tag($styles) {
|
||||
|
@ -396,6 +398,10 @@ abstract class WC_Email extends WC_Settings_API {
|
|||
return $styles;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $styles
|
||||
* @return array
|
||||
*/
|
||||
function style_inline_a_tag($styles) {
|
||||
$styles['color'] = get_option( 'woocommerce_email_text_color' );
|
||||
$styles['font-weight'] = 'normal';
|
||||
|
@ -408,6 +414,7 @@ abstract class WC_Email extends WC_Settings_API {
|
|||
* style_inline_img_tag function.
|
||||
*
|
||||
* @access public
|
||||
* @param array $styles
|
||||
* @return array
|
||||
*/
|
||||
function style_inline_img_tag($styles) {
|
||||
|
@ -438,6 +445,7 @@ abstract class WC_Email extends WC_Settings_API {
|
|||
* get_style_inline_for_tag function.
|
||||
*
|
||||
* @access public
|
||||
* @param string $tag
|
||||
* @return string
|
||||
*/
|
||||
function get_style_inline_for_tag($tag) {
|
||||
|
|
|
@ -125,7 +125,7 @@ abstract class WC_Settings_API {
|
|||
* Gets and option from the settings API, using defaults if necessary to prevent undefined notices.
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $key
|
||||
* @param string $key
|
||||
* @param mixed $empty_value
|
||||
* @return string The value specified for the option or a default value for the option
|
||||
*/
|
||||
|
|
|
@ -55,6 +55,10 @@ class WC_Admin_CPT_Shop_Coupon extends WC_Admin_CPT {
|
|||
return $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print coupon description textarea field
|
||||
* @param WP_Post $post
|
||||
*/
|
||||
public function coupon_description_field( $post ) {
|
||||
if ( $post->post_type != 'shop_coupon' )
|
||||
return;
|
||||
|
|
|
@ -636,6 +636,10 @@ class WC_AJAX {
|
|||
|
||||
// Now find all combinations and create posts
|
||||
if ( ! function_exists( 'array_cartesian' ) ) {
|
||||
/**
|
||||
* @param array $input
|
||||
* @return array
|
||||
*/
|
||||
function array_cartesian( $input ) {
|
||||
$result = array();
|
||||
|
||||
|
|
|
@ -1622,6 +1622,8 @@ class WC_Cart {
|
|||
/**
|
||||
* Remove a single coupon by code
|
||||
* @param string $coupon_code Code of the coupon to remove
|
||||
* @return bool
|
||||
* @todo Should either be void or return true at the end of the function
|
||||
*/
|
||||
public function remove_coupon( $coupon_code ) {
|
||||
// Coupons are globally disabled
|
||||
|
|
|
@ -122,6 +122,7 @@ class WC_Shortcodes {
|
|||
* @access public
|
||||
* @param array $atts
|
||||
* @return string
|
||||
* @todo Must not return void. Need return '';
|
||||
*/
|
||||
public static function product_category( $atts ){
|
||||
global $woocommerce_loop;
|
||||
|
@ -331,6 +332,7 @@ class WC_Shortcodes {
|
|||
* @access public
|
||||
* @param array $atts
|
||||
* @return string
|
||||
* @todo Must not return void. Need return '';
|
||||
*/
|
||||
public static function products( $atts ) {
|
||||
global $woocommerce_loop;
|
||||
|
@ -407,6 +409,7 @@ class WC_Shortcodes {
|
|||
* @access public
|
||||
* @param array $atts
|
||||
* @return string
|
||||
* @todo Must not return void. Need return '';
|
||||
*/
|
||||
public static function product( $atts ) {
|
||||
if (empty($atts)) return;
|
||||
|
@ -466,6 +469,7 @@ class WC_Shortcodes {
|
|||
* @access public
|
||||
* @param array $atts
|
||||
* @return string
|
||||
* @todo Must not return void. Need return '';
|
||||
*/
|
||||
public static function product_add_to_cart( $atts ) {
|
||||
global $wpdb, $post;
|
||||
|
@ -518,6 +522,7 @@ class WC_Shortcodes {
|
|||
* @access public
|
||||
* @param array $atts
|
||||
* @return string
|
||||
* @todo Must not return void. Need return '';
|
||||
*/
|
||||
public static function product_add_to_cart_url( $atts ) {
|
||||
global $wpdb;
|
||||
|
@ -789,6 +794,7 @@ class WC_Shortcodes {
|
|||
* @access public
|
||||
* @param array $atts
|
||||
* @return string
|
||||
* @todo Must not return void. Need return '';
|
||||
*/
|
||||
public static function product_page( $atts ) {
|
||||
if ( empty( $atts ) ) return;
|
||||
|
@ -839,7 +845,6 @@ class WC_Shortcodes {
|
|||
* Show messages
|
||||
*
|
||||
* @access public
|
||||
* @param array $atts
|
||||
* @return string
|
||||
*/
|
||||
public static function shop_messages() {
|
||||
|
@ -945,6 +950,10 @@ class WC_Shortcodes {
|
|||
return '<div class="woocommerce">' . ob_get_clean() . '</div>';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $atts
|
||||
* @return string
|
||||
*/
|
||||
public static function related_products( $atts ) {
|
||||
|
||||
$atts = shortcode_atts( array(
|
||||
|
|
|
@ -23,7 +23,11 @@ class Mijireh_Address extends Mijireh_Model {
|
|||
);
|
||||
}
|
||||
|
||||
public function validate() {
|
||||
/**
|
||||
* Check required fields
|
||||
* @return bool
|
||||
*/
|
||||
public function validate() {
|
||||
$is_valid = $this->_check_required_fields();
|
||||
return $is_valid;
|
||||
}
|
||||
|
|
|
@ -154,13 +154,17 @@ class Mijireh_Order extends Mijireh_Model {
|
|||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the specified item and price to the order.
|
||||
*
|
||||
* Return the total number of items in the order (including the one that was just added)
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
/**
|
||||
* Add the specified item and price to the order.
|
||||
* Return the total number of items in the order (including the one that was just added)
|
||||
*
|
||||
* @param Mijireh_Item|string $name
|
||||
* @param int $price
|
||||
* @param int $quantity
|
||||
* @param string $sku
|
||||
* @throws Mijireh_Exception
|
||||
* @return int
|
||||
*/
|
||||
public function add_item($name, $price=0, $quantity=1, $sku='') {
|
||||
$item = '';
|
||||
if(is_object($name) && get_class($name) == 'Mijireh_Item') {
|
||||
|
|
|
@ -993,8 +993,8 @@ if ( ! function_exists( 'woocommerce_sort_product_tabs' ) ) {
|
|||
* Sort tabs by priority
|
||||
*
|
||||
* @access public
|
||||
* @param mixed $tabs
|
||||
* @return void
|
||||
* @param array $tabs
|
||||
* @return array
|
||||
*/
|
||||
function woocommerce_sort_product_tabs( $tabs = array() ) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue