julien731

AS EDD SL License Optional

Sep 6th, 2016
276
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

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×