Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function my_em_booking_validate( $result, $EM_Booking ){
- if( empty($_REQUEST['x_card_code']) || !preg_match('/^[0-9]{3,4}$/', $_REQUEST['x_card_code']) ){
- $EM_Booking->add_error( esc_html__('A valid CVV number is required.', 'emp-authorizenet') );
- $result = false;
- }
- return $result;
- }
- add_filter( 'em_booking_validate', 'my_em_booking_validate', 100, 2 );
Advertisement
Add Comment
Please, Sign In to add comment