Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hello @agencewebbretagne

    Are you using the Dokan Invoice add-on?

    Thread Starter agencewebbretagne

    (@agencewebbretagne)

    Hello @alexmigf ,
    yes i do.

    jerome

    Plugin Contributor alexmigf

    (@alexmigf)

    Hi @agencewebbretagne

    Please add the following code snippet to your theme functions.php file:

    add_action( 'wpo_wcpdf_after_customer_notes', function( $document_type, $order ) {
    	if( ! empty($order) && $document_type == 'invoice' ) {
    		if( function_exists( 'dokan_get_option' ) ) {
    			$global_percentage = dokan_get_option( 'admin_percentage', 'dokan_selling', 0 );
    			if( ! empty( $global_percentage ) ) {
    				echo '<div class="dokan-global-percentage"><h3>Admin Percentage</h3>'.$global_percentage.'%</div>';
    			}
    		}
    	}
    }, 10, 2 );

    If you never worked with actions/filters please read this documentation page: How to use filters

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add admin commission (Dokan)’ is closed to new replies.