View | Details | Raw Unified | Return to bug 41684
Collapse All | Expand All

(-)a/C4/Letters.pm (-18 / +12 lines)
Lines 620-643 sub GetPreparedLetter { Link Here
620
    }
620
    }
621
621
622
    # add plugin-generated objects
622
    # add plugin-generated objects
623
    if ( C4::Context->config("enable_plugins") ) {
623
    my @plugins = Koha::Plugins->get_enabled_plugins();
624
        my @plugins = Koha::Plugins->new->GetPlugins(
624
    @plugins = grep { $_->can('notices_content') } @plugins;
625
            {
626
                method => 'notices_content',
627
            }
628
        );
629
625
630
        foreach my $plugin (@plugins) {
626
    foreach my $plugin (@plugins) {
631
            my $namespace = $plugin->get_metadata()->{namespace};
627
        my $namespace = $plugin->get_metadata()->{namespace};
632
            if ($namespace) {
628
        if ($namespace) {
633
                try {
629
            try {
634
                    if ( my $content = $plugin->notices_content( \%params ) ) {
630
                if ( my $content = $plugin->notices_content( \%params ) ) {
635
                        $objects->{plugin_content}->{$namespace} = $content;
631
                    $objects->{plugin_content}->{$namespace} = $content;
636
                    }
632
                }
637
                } catch {
633
            } catch {
638
                    next;
634
                next;
639
                };
635
            };
640
            }
641
        }
636
        }
642
    }
637
    }
643
638
644
- 

Return to bug 41684