Fix up the other delete signatures.
This commit is contained in:
parent
eade55041c
commit
53524141b7
|
@ -117,7 +117,7 @@ abstract class WC_Data {
|
|||
*/
|
||||
public function delete( $force_delete = false ) {
|
||||
if ( $this->data_store ) {
|
||||
$this->data_store->delete( $this, $force_delete );
|
||||
$this->data_store->delete( $this, array( 'force_delete' => $force_delete ) );
|
||||
$this->set_id( 0 );
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -190,7 +190,7 @@ class WC_Customer extends WC_Legacy_Customer {
|
|||
*/
|
||||
public function delete_and_reassign( $reassign = null ) {
|
||||
if ( $this->data_store ) {
|
||||
$this->data_store->delete( $this, true, $reassign );
|
||||
$this->data_store->delete( $this, array( 'force_delete' => true, 'reassign' => $reassign ) );
|
||||
$this->set_id( 0 );
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -32,9 +32,9 @@ interface WC_Object_Data_Store {
|
|||
|
||||
/**
|
||||
* Deletes a record from the database.
|
||||
* @param WC_Data
|
||||
* @param bool $force_delete True to permently delete, false to trash.
|
||||
* @param WC_Data
|
||||
* @param array $args Array of args to pass to the delete method.
|
||||
* @return bool result
|
||||
*/
|
||||
public function delete( &$data, $force_delete = false );
|
||||
public function delete( &$data, $args = array() );
|
||||
}
|
||||
|
|
|
@ -14,14 +14,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
*/
|
||||
interface WC_Customer_Data_Store_Interface {
|
||||
|
||||
/**
|
||||
* Deletes a customer from the database.
|
||||
*
|
||||
* @param WC_Customer
|
||||
* @param int|null $reassign Who to reassign posts to.
|
||||
*/
|
||||
public function delete( &$data, $reassign = null );
|
||||
|
||||
/**
|
||||
* Gets the customers last order.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue