get_id() ) || wcs_order_contains_subscription( $order, 'any' ) ) ) { $grant_access = false; } return $grant_access; } /** * Adds the Drip Downloadable Content setting. * * @since 4.0.0 * * @param array $settings The WC Subscriptions settings array. * @return array Settings. */ public static function add_setting( $settings ) { $setting = array( 'name' => __( 'Drip Downloadable Content', 'woocommerce-subscriptions' ), 'desc' => __( 'Enable dripping for downloadable content on subscription products.', 'woocommerce-subscriptions' ), 'id' => WC_Subscriptions_Admin::$option_prefix . '_drip_downloadable_content_on_renewal', 'default' => 'no', 'type' => 'checkbox', // translators: %s is a line break. 'desc_tip' => sprintf( __( 'Enabling this grants access to new downloadable files added to a product only after the next renewal is processed.%sBy default, access to new downloadable files added to a product is granted immediately to any customer that has an active subscription with that product.', 'woocommerce-subscriptions' ), '
' ), ); WC_Subscriptions_Admin::insert_setting_after( $settings, WC_Subscriptions_Admin::$option_prefix . '_miscellaneous', $setting ); return $settings; } }