WC_GZD_Revocation

Contains Revocation Form Fields.

Defined (1)

The class is defined in the following location(s).

/includes/class-wc-gzd-revocation.php  
  1. class WC_GZD_Revocation { 
  2.  
  3. /** 
  4. * Returns necessary form fields for revocation_form 
  5. *  
  6. * @return array  
  7. */ 
  8. public static function get_fields() { 
  9. return array( 
  10. 'content' => array( 
  11. 'type' => 'textarea',  
  12. 'label' => _x( 'Revocation', 'revocation-form', 'woocommerce-germanized' ),  
  13. 'required' => true,  
  14. 'description' => _x( 'Tip: Delete whatever entry does not apply, and provide, as needed', 'revocation-form', 'woocommerce-germanized' ),  
  15. 'default' => _x( 'I/We hereby give notice that I/We withdraw from my/our contract of sale of the following goods/provision of the following service: ', 'revocation-form', 'woocommerce-germanized' ),  
  16. ),  
  17. 'received' => array( 
  18. 'type' => 'text',  
  19. 'label' => _x( 'Received', 'revocation-form', 'woocommerce-germanized' ),  
  20. ),  
  21. 'order_date' => array( 
  22. 'type' => 'text',  
  23. 'label' => _x( 'Order Date', 'revocation-form', 'woocommerce-germanized' ),  
  24. ),  
  25. 'sep' => _x( 'Customer Data', 'revocation-form', 'woocommerce-germanized' ),  
  26. 'address_title' => array( 
  27. 'type' => 'select',  
  28. 'label' => _x( 'Title', 'revocation-form', 'woocommerce-germanized' ),  
  29. 'required' => true,  
  30. 'options' => array(  
  31. __( 'Mr.', 'woocommerce-germanized' ) => __( 'Mr.', 'woocommerce-germanized' ),  
  32. __( 'Ms.', 'woocommerce-germanized' ) => __( 'Ms.', 'woocommerce-germanized' ) 
  33. ),  
  34. ),  
  35. 'address_firstname' => array( 
  36. 'type' => 'text',  
  37. 'label' => _x( 'First Name', 'revocation-form', 'woocommerce-germanized' ),  
  38. 'required' => true,  
  39. ),  
  40. 'address_lastname' => array( 
  41. 'type' => 'text',  
  42. 'label' => _x( 'Last Name', 'revocation-form', 'woocommerce-germanized' ),  
  43. 'required' => true,  
  44. ),  
  45. 'address_street' => array( 
  46. 'type' => 'text',  
  47. 'label' => _x( 'Street', 'revocation-form', 'woocommerce-germanized' ),  
  48. 'required' => true,  
  49. ),  
  50. 'address_postal' => array( 
  51. 'type' => 'text',  
  52. 'label' => _x( 'Postal Code', 'revocation-form', 'woocommerce-germanized' ),  
  53. 'required' => true,  
  54. ),  
  55. 'address_city' => array( 
  56. 'type' => 'text',  
  57. 'label' => _x( 'City', 'revocation-form', 'woocommerce-germanized' ),  
  58. 'required' => true,  
  59. ),  
  60. 'address_country' => array( 
  61. 'type' => 'country',  
  62. 'label' => _x( 'Country', 'revocation-form', 'woocommerce-germanized' ),  
  63. 'default' => 'DE',  
  64. ),  
  65. 'address_mail' => array( 
  66. 'type' => 'text',  
  67. 'validate' => array("email"),  
  68. 'label' => _x( 'Mail', 'revocation-form', 'woocommerce-germanized' ),  
  69. 'required' => true,  
  70. ),  
  71. );