Custom WooCommerce Settings Page

Custom WooCommerce Settings Page

Getting your Trinity Audio player ready...
1.2 Create the Settings Page Content

Now, create the callback function that renders the settings page content and provides the form to input bulk discount details:

function woocommerce_bulk_discount_settings_page() {
    ?>
    <div class="wrap">
        <h1><?php echo esc_html('WooCommerce Bulk Discount Settings'); ?></h1>
        <form method="post" action="options.php">
            <?php
            // Output security fields for the registered setting
            settings_fields('wc_bulk_discount_settings_group');
            
            // Output setting sections and their fields
            do_settings_sections('wc_bulk_discount_settings');
            
            // Output save settings button
            submit_button('Save Bulk Discount Settings');
            ?>
        </form>
    </div>
    <?php
}

Similar Posts