LLMS_Meta_Box_Order_Details::save( int $post_id )
Save method Does nothing because there’s no editable data in this metabox
Description Description
Parameters Parameters
- $post_id
-
(int) (Required) Post ID of the Order
Return Return
(void)
Source Source
File: includes/admin/post-types/meta-boxes/class.llms.meta.box.order.details.php
public function save( $post_id ) { $order = llms_get_post( $this->post ); if ( ! $order || ! is_a( $order, 'LLMS_Order' ) ) { return; } // $gateway = $order->get_gateway(); $fields = array( 'payment_gateway', 'gateway_customer_id', 'gateway_subscription_id', 'gateway_source_id', ); foreach ( $fields as $key ) { if ( isset( $_POST[ $key ] ) ) { $order->set( $key, sanitize_text_field( $_POST[ $key ] ) ); } } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: