PATH:
home
/
letacommog
/
laindinois
/
wp-content
/
plugins
/
woocommerce-pdf-vouchers
/
includes
/
compatibility
<?php // Exit if accessed directly if ( !defined( 'ABSPATH' ) ) exit; /** * Dokan Class. To enhance compatibility with Dokan plugin. * * @package WooCommerce - PDF Vouchers * @since 3.8.2 */ class WOO_Vou_WeDevs_Dokan { public function __construct() { } /** * Modify Dokan Role Array * * Handle to modify vendor role array * * @package WooCommerce - PDF Vouchers * @since 3.8.2 */ public function woo_vou_dokan_voucher_role( $woo_vou_roles ) { // Get global options $vou_enable_auto_integrate_dokan_vendor = get_option('vou_enable_auto_integrate_dokan_vendor'); // add doken seller as a vendor if( empty( $vou_enable_auto_integrate_dokan_vendor ) || $vou_enable_auto_integrate_dokan_vendor == 'yes' ) { $woo_vou_roles[] = 'seller'; } return $woo_vou_roles; } /** * Modify WeDevs Dokan Role Array * * Handle to modify settings array * * @package WooCommerce - PDF Vouchers * @since 3.8.2 */ public function woo_vou_dokan_settings( $settings ) { // add doken seller as a vendor array_push($settings, array( 'name' => esc_html__( 'Dokan Multi Vendor Settings', 'woovoucher' ), 'type' => 'title', 'desc' => '', 'id' => 'vou_dokan_settings' ), array( 'id' => 'vou_enable_auto_integrate_dokan_vendor', 'name' => esc_html__( 'Auto Integrate Dokan Multi Vendor vendor\'s access', 'woovoucher' ), 'desc' => esc_html__( 'Auto Integrate Dokan Multi Vendor vendor\'s access', 'woovoucher' ), 'type' => 'checkbox', 'desc_tip' => '<p class="description">' . esc_html__( 'Check this box if you want to integrate Dokan Multi Vendor vendors with PDF Vouchers vendors so that you have same access as pdf vouchers vendor\'s have.', 'woovoucher' ) . '</p>', 'default' => 'yes' ), array( 'type' => 'sectionend', 'id' => 'vou_dokan_settings' ) ); return $settings; } /** * Adding Hooks * * Adding proper hooks for Vendor. * * @package WooCommerce - PDF Vouchers * @since 3.8.2 */ public function add_hooks(){ // Append the pdf voucher role add_filter( 'woo_vou_edit_vendor_role', array($this, 'woo_vou_dokan_voucher_role' ) ); // Append the settings array add_filter( 'woo_vou_misc_settings', array( $this, 'woo_vou_dokan_settings' ) ); } }
[+]
..
[-] class-woo-vou-your-price.php
[edit]
[-] class-woo-vou-wedevs-dokan.php
[edit]
[-] class-woo-vou-order-sms.php
[edit]
[-] class-woo-vou-booking.php
[edit]
[-] class-woo-vou-qtranslate-x.php
[edit]
[-] class-woo-vou-wpml.php
[edit]
[-] class-woo-vou-vendor-pro.php
[edit]
[-] class-woo-vou-eml.php
[edit]
[-] class-woo-vou-vendor.php
[edit]
[-] class-woo-vou-wcmp.php
[edit]
[-] class-woo-vou-bundles.php
[edit]
[-] class-woo-vou-currency-switcher.php
[edit]