@@ -149,7 +149,7 @@ |
||
149 | 149 | * |
150 | 150 | * @param mixed $value (default: ''). |
151 | 151 | * @param WC_Product $product Product object. |
152 | - * @return mixed $value Should be in a format that can be output into a text file (string, numeric, etc). |
|
152 | + * @return string $value Should be in a format that can be output into a text file (string, numeric, etc). |
|
153 | 153 | */ |
154 | 154 | public function add_export_data_alt_products( $value, $product ) { |
155 | 155 | $value = $product->get_meta( '_alt_products', true, 'edit' ); |
@@ -207,7 +207,7 @@ |
||
207 | 207 | '_hide_from_shop', |
208 | 208 | '_hide_from_search', |
209 | 209 | ); |
210 | - $meta_keys = array_unique( array_merge( $meta_keys, $dp_meta_keys ) ); |
|
210 | + $meta_keys = array_unique( array_merge( $meta_keys, $dp_meta_keys ) ); |
|
211 | 211 | return $meta_keys; |
212 | 212 | } |
213 | 213 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $alt_option = get_option( 'dc_alt_text' ); |
71 | 71 | $text = dp_alt_products_text( $prod_text_option, $text_option, __( 'This product has been discontinued.', 'woocommerce-discontinued-products' ) ); |
72 | 72 | $alt = dp_alt_products_text( $prod_alt_option, $alt_option, __( 'You may be interested in:', 'woocommerce-discontinued-products' ) ); |
73 | - $notice = $no_alt ? '<h4 class="discontinued-notice">' . esc_html($text) . '</H4>' : '<h4 class="discontinued-notice">' . esc_html($text) . '</H4><h4 class="discontinued-notice-alt">' . esc_html($alt) . '</H4>'; |
|
73 | + $notice = $no_alt ? '<h4 class="discontinued-notice">' . esc_html( $text ) . '</H4>' : '<h4 class="discontinued-notice">' . esc_html( $text ) . '</H4><h4 class="discontinued-notice-alt">' . esc_html( $alt ) . '</H4>'; |
|
74 | 74 | return $notice; |
75 | 75 | } |
76 | 76 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | function discontinued_template_loop_price( $price, $product ) { |
121 | 121 | $product_id = $product->get_id(); |
122 | 122 | if ( dp_is_discontinued( $product_id ) ) { |
123 | - if(is_admin()){ |
|
123 | + if ( is_admin() ) { |
|
124 | 124 | return 'Discontinued'; |
125 | 125 | } |
126 | 126 | $prod_text_option = get_post_meta( $product_id, '_discontinued_product_text', true ); |
@@ -120,7 +120,7 @@ |
||
120 | 120 | function discontinued_template_loop_price( $price, $product ) { |
121 | 121 | $product_id = $product->get_id(); |
122 | 122 | if ( dp_is_discontinued( $product_id ) ) { |
123 | - if(is_admin()){ |
|
123 | + if(is_admin()) { |
|
124 | 124 | return 'Discontinued'; |
125 | 125 | } |
126 | 126 | $prod_text_option = get_post_meta( $product_id, '_discontinued_product_text', true ); |
@@ -135,7 +135,7 @@ |
||
135 | 135 | /** |
136 | 136 | * Discontinued_template_price_class - Add "discontinued" to the price class. |
137 | 137 | * |
138 | - * @return null |
|
138 | + * @return string |
|
139 | 139 | */ |
140 | 140 | function discontinued_template_price_class( $val, $class ) { |
141 | 141 | $class = $val . ' discontinued'; |
@@ -307,7 +307,7 @@ |
||
307 | 307 | 'compare' => 'NOT EXISTS' |
308 | 308 | ) |
309 | 309 | )); |
310 | - $query->set('meta_query', $args); |
|
310 | + $query->set( 'meta_query', $args ); |
|
311 | 311 | } |
312 | 312 | return $query; |
313 | 313 | } |
@@ -8,10 +8,8 @@ |
||
8 | 8 | * Version: 1.1.7 |
9 | 9 | * Text Domain: woocommerce-discontinued-products |
10 | 10 | * Domain Path: /languages |
11 | - |
|
12 | 11 | * License: GNU General Public License v3.0 |
13 | 12 | * License URI: http://www.gnu.org/licenses/gpl-3.0.html |
14 | - |
|
15 | 13 | * @package woocommerce |
16 | 14 | */ |
17 | 15 |