LLMS_Payment_Gateway::get_admin_settings_fields()

Get default gateway admin settings fields


Return Return

(array[])


Top ↑

Source Source

File: includes/abstracts/abstract.llms.payment.gateway.php

343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
public function get_admin_settings_fields() {
 
    $fields = array();
 
    $fields[] = array(
        'type'  => 'custom-html',
        'value' => '
            <h1>' . $this->get_admin_title() . '</h1>
            <p>' . $this->get_admin_description() . '</p>
        ',
    );
 
    $fields[] = array(
        'autoload'     => true,
        'id'           => $this->get_option_name( 'enabled' ),
        'desc'         => sprintf( _x( 'Enable %s', 'Payment gateway title', 'lifterlms' ), $this->get_admin_title() ),
        'desc_tooltip' => __( 'Checking this box will allow users to use this payment gateway.', 'lifterlms' ),
        'default'      => $this->get_enabled(),
        'title'        => __( 'Enable / Disable', 'lifterlms' ),
        'type'         => 'checkbox',
    );
 
    $fields[] = array(
        'id'      => $this->get_option_name( 'title' ),
        'desc'    => '<br>' . __( 'The title the user sees during checkout.', 'lifterlms' ),
        'default' => $this->get_title(),
        'title'   => __( 'Title', 'lifterlms' ),
        'type'    => 'text',
    );
 
    $fields[] = array(
        'id'      => $this->get_option_name( 'description' ),
        'desc'    => '<br>' . __( 'The description the user sees during checkout.', 'lifterlms' ),
        'default' => $this->get_description(),
        'title'   => __( 'Description', 'lifterlms' ),
        'type'    => 'text',
    );
 
    if ( $this->supports( 'test_mode' ) ) {
 
        $fields[] = array(
            'id'           => $this->get_option_name( 'test_mode_enabled' ),
            'desc'         => sprintf( _x( 'Enable %s', 'Payment gateway test mode title', 'lifterlms' ), $this->get_test_mode_title() ),
            'desc_tooltip' => $this->get_test_mode_description(),
            'default'      => $this->get_test_mode_enabled(),
            'title'        => $this->get_test_mode_title(),
            'type'         => 'checkbox',
        );
 
    }
 
    $fields[] = array(
        'id'           => $this->get_option_name( 'logging_enabled' ),
        'desc'         => __( 'Enable debug logging', 'lifterlms' ),
        'desc_tooltip' => sprintf( __( 'When enabled, debugging information will be logged to "%s"', 'lifterlms' ), llms_get_log_path( $this->get_id() ) ),
        'title'        => __( 'Debug Log', 'lifterlms' ),
        'type'         => 'checkbox',
    );
 
    /**
     * Filters the gateway's settings fields displayed on the admin panel
     *
     * @since 3.0.0
     *
     * @param array[] $fields     Array of settings fields.
     * @param string  $gateway_id The payment gateway ID.
     */
    return apply_filters( 'llms_get_gateway_settings_fields', $fields, $this->id );
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
3.29.0 Unknown.
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.