slswc_software_tabs

Filter the software tabs displayed on single product url.

Parameters:
array $software_tabs The current software tabs.

Example usage:

<?php
add_filter( 'slswc_software_tabs', function( $software_tabs ) {
    $software_tabs['software-details'] = array(
        'title' => __( 'Software Details', 'text_domain' ),
        'priority' => 50,
        'callback' => 'software_details_callback'
    );
});

function software_details_callback() {
    $software = new WC_Product_Software( get_the_ID() ); ?>
    <p>Author: <?php echo esc_attr( $software->get_software_author() ); ?></p>
    <p>Version: <?php echo esc_attr( $software->get_software_version() ); ?></p>
    <p>Docs: <?php echo esc_url_raw( $software->get_documentation_url() ); ?></p>
    <?
}
Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support
Scroll to Top