WC_Legacy_Payment_Token::create()
Deprecated from version 3.0.0. It is no longer supported and can be removed in future releases. Use
::save
instead.Create a token.
Method of the class: WC_Legacy_Payment_Token{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Legacy_Payment_Token = new WC_Legacy_Payment_Token(); $WC_Legacy_Payment_Token->create();
Changelog
Deprecated since 3.0.0 | - Use ::save instead. |
WC_Legacy_Payment_Token::create() WC Legacy Payment Token::create code WC 9.2.3
public function create() { wc_deprecated_function( 'WC_Payment_Token::create', '3.0.0', 'WC_Payment_Token::save instead.' ); $data_store = WC_Data_Store::load( 'payment-token' ); try { $data_store->create( $this ); } catch ( Exception $e ) { return false; } }