| | |
| | | namespace JVBase\managers; |
| | | |
| | | use Exception; |
| | | use JVBase\inc\managers\ErrorHelper; |
| | | use JVBase\Instance; |
| | | use JVBase\registrar\Registrar; |
| | | use JVBase\rest\Rest; |
| | |
| | | } |
| | | class Favourites |
| | | { |
| | | use Instance; |
| | | use Instance, ErrorHelper; |
| | | |
| | | protected CustomTable $favourites; |
| | | protected CustomTable $lists; |
| | |
| | | 'item_id' => $post_id |
| | | ])->deleteResults(); |
| | | } catch (Exception $e) { |
| | | Errors::getInstance()->log('cleanupPostFavourites', $e->getMessage(), [ |
| | | $this->logError($e->getMessage(), 'cleanupPostFavourites',[ |
| | | 'post_id' => $post_id |
| | | ]); |
| | | } |
| | |
| | | 'item_id' => $term_id |
| | | ])->deleteResults(); |
| | | } catch (Exception $e) { |
| | | Errors::getInstance()->log('cleanupTermFavourites', $e->getMessage(), [ |
| | | $this->logError($e->getMessage(), 'cleanupTermFavourites',[ |
| | | 'term_id' => $term_id, |
| | | 'taxonomy'=> $taxonomy |
| | | ]); |