LLMS_Shortcode_Checkout::setup_plan_and_form_atts( int $plan_id, array $atts )

Setup attributes for plan and form information


Parameters Parameters

$plan_id

(int) (Required) LLMS_Access_Plan post id.

$atts

(array) (Required) Existing attributes.


Top ↑

Return Return

(array) Modified attributes array.


Top ↑

Source Source

File: includes/shortcodes/class.llms.shortcode.checkout.php

	protected static function setup_plan_and_form_atts( $plan_id, $atts ) {

		$plan = new LLMS_Access_Plan( $plan_id );

		$atts['plan']    = $plan;
		$atts['product'] = $plan->get_product();
		$atts['is_free'] = $plan->has_free_checkout();

		$atts['form_location'] = 'checkout';
		$atts['form_title']    = llms_get_form_title( $atts['form_location'], array( 'plan' => $plan ) );
		$atts['form_fields']   = self::clean_form_fields( llms_get_form_html( $atts['form_location'], array( 'plan' => $plan ) ) );

		return $atts;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.1.0 Properly detect empty form fields when the html is only composed of blanks and empty paragraphs.
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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