Passed
Push — master ( bdcc6b...fb9755 )
by Warwick
05:41 queued 13s
created

lsx_wc_delivery_date_args()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
c 1
b 0
f 0
nc 2
nop 2
dl 0
loc 5
rs 10
1
<?php 
2
/**
3
 * WooCommerce Addons filters and functions
4
 *
5
 * @package    lsx
6
 * @subpackage woocommerce
7
 */
8
9
10
/**
11
 * WooCommerce Order Delivery Date
12
 */
13
if ( ! function_exists( 'wc_od_get_delivery_date_field_args' ) ) {
14
15
	/**
16
	 * Change the arguments for the checkout delivery date field.
17
	 *
18
	 * @package    lsx
19
	 * @subpackage woocommerce
20
	 * @param      $args array
21
	 * @return     array
22
	 */
23
	function lsx_wc_delivery_date_args( $args = array(), $context ) {
24
		if ( 'checkout' === $context ) {
25
			$args[] = _x( 'Date', 'Delivery date checkout field label', 'lsx' );
26
		}
27
		return $args;
28
	}
29
	add_action( 'wc_od_delivery_date_field_args', 'lsx_wc_delivery_date_args', 10, 2 );
30
31
}
32