daily pastebin goal
93%
SHARE
TWEET

AS EDD SL License Optional

julien731 Sep 6th, 2016 123 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if ( function_exists( 'asedd_cf_param_product_license' ) ) {
  2.     add_filter( 'as_edd_product_license_field_args', 'wpas_edd_sl_license_optional' );
  3.     /**
  4.      * Make the license field optional
  5.      *
  6.      * Removed the "required" attribute from the license field displayed in the ticket submission form.
  7.      *
  8.      * @param array $args Custom field arguments
  9.      *
  10.      * @return array
  11.      */
  12.     function wpas_edd_sl_license_optional( $args ) {
  13.  
  14.         $args['required'] = false;
  15.  
  16.         return $args;
  17.  
  18.     }
  19. }
  20.  
  21. if ( function_exists( 'asedd_check_license_key' ) ) {
  22.     /**
  23.      * Remove license validity verification on ticket submission process
  24.      */
  25.     remove_filter( 'wpas_before_submit_new_ticket_checks', 'asedd_check_license_key', 10 );
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top