LLMS_Order::start_access()
Record the start date of the access plan and schedule expiration if expiration is required in the future
Return Return
(void)
Source Source
File: includes/models/model.llms.order.php
1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 | 'billing_phone' => '' , ); $user = ! is_array ( $user_or_data ) ? llms_get_student( $user_or_data ) : false; if ( $user ) { $user_or_data = array (); $map = array ( 'user_id' => 'id' , 'billing_email' => 'user_email' , 'billing_phone' => 'phone' , 'billing_first_name' => 'first_name' , 'billing_last_name' => 'last_name' , ); foreach ( array_keys ( $to_set ) as $order_key ) { $to_set [ $order_key ] = $user ->get( $map [ $order_key ] ?? $order_key ); } } // Only use the default IP address if it wasn't specified in the input array. $to_set [ 'user_ip_address' ] = $user_or_data [ 'user_ip_address' ] ?? llms_get_ip_address(); |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.2.0 | Use strict type comparision. |
3.19.0 | Unknown. |
3.0.0 | Introduced. |