woocommerce_date_input_html_pattern

woocommerce_date_input_html_pattern

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_date_input_html_pattern') is found 7 times:

  • /includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php line 125
    						'description'       => __( 'The coupon will expire at 00:00:00 of this date.', 'woocommerce' ),
    						'desc_tip'          => true,
    						'class'             => 'date-picker',
    						'custom_attributes' => array(
    							'pattern' => apply_filters( 'woocommerce_date_input_html_pattern', '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])' ),
    						),
    					)
    				);
    
    				do_action( 'woocommerce_coupon_options', $coupon->get_id(), $coupon );
    
    
  • /includes/admin/meta-boxes/class-wc-meta-box-order-data.php line 303
    							<?php
    							$order_date_created_localised = ! is_null( $order->get_date_created() ) ? $order->get_date_created()->getOffsetTimestamp() : '';
    							?>
    							<label for="order_date"><?php esc_html_e( 'Date created:', 'woocommerce' ); ?></label>
    							<input type="text" class="date-picker" name="order_date" maxlength="10" value="<?php echo esc_attr( date_i18n( 'Y-m-d', $order_date_created_localised ) ); ?>" pattern="<?php echo esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '&#91;0-9&#93;{4}-(0&#91;1-9&#93;|1&#91;012&#93;)-(0&#91;1-9&#93;|1&#91;0-9&#93;|2&#91;0-9&#93;|3&#91;01&#93;)' ) ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment ?>" />@
    							&lrm;
    							<input type="number" class="hour" placeholder="<?php esc_attr_e( 'h', 'woocommerce' ); ?>" name="order_date_hour" min="0" max="23" step="1" value="<?php echo esc_attr( date_i18n( 'H', $order_date_created_localised ) ); ?>" pattern="([01]?[0-9]{1}|2[0-3]{1})" />:
    							<input type="number" class="minute" placeholder="<?php esc_attr_e( 'm', 'woocommerce' ); ?>" name="order_date_minute" min="0" max="59" step="1" value="<?php echo esc_attr( date_i18n( 'i', $order_date_created_localised ) ); ?>" pattern="[0-5]{1}[0-9]{1}" />
    							<input type="hidden" name="order_date_second" value="<?php echo esc_attr( date_i18n( 's', $order_date_created_localised ) ); ?>" />
    						</p>
    
    
  • /includes/admin/meta-boxes/views/html-order-download-permission.php line 33

    Share this:

  • /includes/admin/meta-boxes/views/html-product-data-general.php line 68
    		$sale_price_dates_to   = $sale_price_dates_to_timestamp ? date_i18n( 'Y-m-d', $sale_price_dates_to_timestamp ) : '';
    
    		echo '<p class="form-field sale_price_dates_fields">
    				<label for="_sale_price_dates_from">' . esc_html__( 'Sale price dates', 'woocommerce' ) . '</label>
    				<input type="text" class="short" name="_sale_price_dates_from" id="_sale_price_dates_from" value="' . esc_attr( $sale_price_dates_from ) . '" placeholder="' . esc_html( _x( 'From&hellip;', 'placeholder', 'woocommerce' ) ) . ' YYYY-MM-DD" maxlength="10" pattern="' . esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '&#91;0-9&#93;{4}-(0&#91;1-9&#93;|1&#91;012&#93;)-(0&#91;1-9&#93;|1&#91;0-9&#93;|2&#91;0-9&#93;|3&#91;01&#93;)' ) ) . '" />
    				<input type="text" class="short" name="_sale_price_dates_to" id="_sale_price_dates_to" value="' . esc_attr( $sale_price_dates_to ) . '" placeholder="' . esc_html( _x( 'To&hellip;', 'placeholder', 'woocommerce' ) ) . '  YYYY-MM-DD" maxlength="10" pattern="' . esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '&#91;0-9&#93;{4}-(0&#91;1-9&#93;|1&#91;012&#93;)-(0&#91;1-9&#93;|1&#91;0-9&#93;|2&#91;0-9&#93;|3&#91;01&#93;)' ) ) . '" />
    				<a href="#" class="description cancel_sale_schedule">' . esc_html__( 'Cancel', 'woocommerce' ) . '</a>' . wc_help_tip( __( 'The sale will start at 00:00:00 of "From" date and end at 23:59:59 of "To" date.', 'woocommerce' ) ) . '
    			</p>';
    
    		do_action( 'woocommerce_product_options_pricing' );
    		?>
    
  • /includes/admin/meta-boxes/views/html-product-data-general.php line 69
     
    		echo '<p class="form-field sale_price_dates_fields">
    				<label for="_sale_price_dates_from">' . esc_html__( 'Sale price dates', 'woocommerce' ) . '</label>
    				<input type="text" class="short" name="_sale_price_dates_from" id="_sale_price_dates_from" value="' . esc_attr( $sale_price_dates_from ) . '" placeholder="' . esc_html( _x( 'From&hellip;', 'placeholder', 'woocommerce' ) ) . ' YYYY-MM-DD" maxlength="10" pattern="' . esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '&#91;0-9&#93;{4}-(0&#91;1-9&#93;|1&#91;012&#93;)-(0&#91;1-9&#93;|1&#91;0-9&#93;|2&#91;0-9&#93;|3&#91;01&#93;)' ) ) . '" />
    				<input type="text" class="short" name="_sale_price_dates_to" id="_sale_price_dates_to" value="' . esc_attr( $sale_price_dates_to ) . '" placeholder="' . esc_html( _x( 'To&hellip;', 'placeholder', 'woocommerce' ) ) . '  YYYY-MM-DD" maxlength="10" pattern="' . esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '&#91;0-9&#93;{4}-(0&#91;1-9&#93;|1&#91;012&#93;)-(0&#91;1-9&#93;|1&#91;0-9&#93;|2&#91;0-9&#93;|3&#91;01&#93;)' ) ) . '" />
    				<a href="#" class="description cancel_sale_schedule">' . esc_html__( 'Cancel', 'woocommerce' ) . '</a>' . wc_help_tip( __( 'The sale will start at 00:00:00 of "From" date and end at 23:59:59 of "To" date.', 'woocommerce' ) ) . '
    			</p>';
    
    		do_action( 'woocommerce_product_options_pricing' );
    		?>
    	</div>
    
  • /includes/admin/meta-boxes/views/html-variation-admin.php line 184
    				/* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */
    				echo '<div class="form-field sale_price_dates_fields hidden">
    					<p class="form-row form-row-first">
    						<label>' . esc_html__( 'Sale start date', 'woocommerce' ) . '</label>
    						<input type="text" class="sale_price_dates_from" name="variable_sale_price_dates_from&#91;' . esc_attr( $loop ) . '&#93;" value="' . esc_attr( $sale_price_dates_from ) . '" placeholder="' . esc_attr_x( 'From&hellip;', 'placeholder', 'woocommerce' ) . ' YYYY-MM-DD" maxlength="10" pattern="' . esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '&#91;0-9&#93;{4}-(0&#91;1-9&#93;|1&#91;012&#93;)-(0&#91;1-9&#93;|1&#91;0-9&#93;|2&#91;0-9&#93;|3&#91;01&#93;)' ) ) . '" />
    					</p>
    					<p class="form-row form-row-last">
    						<label>' . esc_html__( 'Sale end date', 'woocommerce' ) . '</label>
    						<input type="text" class="sale_price_dates_to" name="variable_sale_price_dates_to&#91;' . esc_attr( $loop ) . '&#93;" value="' . esc_attr( $sale_price_dates_to ) . '" placeholder="' . esc_attr_x( 'To&hellip;', 'placeholder', 'woocommerce' ) . '  YYYY-MM-DD" maxlength="10" pattern="' . esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '&#91;0-9&#93;{4}-(0&#91;1-9&#93;|1&#91;012&#93;)-(0&#91;1-9&#93;|1&#91;0-9&#93;|2&#91;0-9&#93;|3&#91;01&#93;)' ) ) . '" />
    					</p>
    				</div>';
    
  • /includes/admin/meta-boxes/views/html-variation-admin.php line 188
    						<input type="text" class="sale_price_dates_from" name="variable_sale_price_dates_from&#91;' . esc_attr( $loop ) . '&#93;" value="' . esc_attr( $sale_price_dates_from ) . '" placeholder="' . esc_attr_x( 'From&hellip;', 'placeholder', 'woocommerce' ) . ' YYYY-MM-DD" maxlength="10" pattern="' . esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '&#91;0-9&#93;{4}-(0&#91;1-9&#93;|1&#91;012&#93;)-(0&#91;1-9&#93;|1&#91;0-9&#93;|2&#91;0-9&#93;|3&#91;01&#93;)' ) ) . '" />
    					</p>
    					<p class="form-row form-row-last">
    						<label>' . esc_html__( 'Sale end date', 'woocommerce' ) . '</label>
    						<input type="text" class="sale_price_dates_to" name="variable_sale_price_dates_to&#91;' . esc_attr( $loop ) . '&#93;" value="' . esc_attr( $sale_price_dates_to ) . '" placeholder="' . esc_attr_x( 'To&hellip;', 'placeholder', 'woocommerce' ) . '  YYYY-MM-DD" maxlength="10" pattern="' . esc_attr( apply_filters( 'woocommerce_date_input_html_pattern', '&#91;0-9&#93;{4}-(0&#91;1-9&#93;|1&#91;012&#93;)-(0&#91;1-9&#93;|1&#91;0-9&#93;|2&#91;0-9&#93;|3&#91;01&#93;)' ) ) . '" />
    					</p>
    				</div>';
    				/* phpcs: enable */
    
    				/**
    				 * Variation options pricing action.