LLMS_Settings_Checkout::save()

Override default save method to save the display order of payment gateways


Return Return

(void)


Top ↑

Source Source

File: includes/admin/settings/class.llms.settings.checkout.php

		if ( ! llms_verify_nonce( '_wpnonce', 'lifterlms-settings' ) ) {
			return;
		}

		// Save all custom fields.
		parent::save();

		// Save display order of gateways.
		foreach ( llms()->payment_gateways()->get_payment_gateways() as $id => $gateway ) {
			$option = $gateway->get_option_name( 'display_order' );
			if ( isset( $_POST[ $option ] ) ) {
				update_option( $option, absint( $_POST[ $option ] ) );
			}
		}
	}



Top ↑

Changelog Changelog

Changelog
Version Description
3.35.1 Verify nonce.
3.17.5 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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