| | |
| | | } |
| | | } |
| | | |
| | | $this->cache->clear(); |
| | | $this->cache->flush(); |
| | | |
| | | return $this->success(['message' => "Referral marked as {$status}"]); |
| | | } |
| | |
| | | } |
| | | |
| | | $this->wpdb->delete($this->referrals_table, ['id' => $referral_id], ['%d']); |
| | | $this->cache->clear(); |
| | | $this->cache->flush(); |
| | | |
| | | return $this->success(['message' => 'Referral removed']); |
| | | } |
| | |
| | | ]; |
| | | |
| | | update_option(BASE . 'referral_settings', $settings); |
| | | $this->cache->clear(); |
| | | $this->cache->flush(); |
| | | |
| | | return $this->success([ |
| | | 'message' => 'Settings updated', |
| | |
| | | $data['message'] |
| | | ); |
| | | if ($result['success']) { |
| | | $this->cache->clear(); |
| | | $this->cache->flush(); |
| | | } |
| | | |
| | | // Build summary message |
| | |
| | | } |
| | | |
| | | // Clear cache |
| | | $this->cache->clear(); |
| | | $this->cache->flush(); |
| | | |
| | | return new WP_REST_Response([ |
| | | 'success' => true, |
| | |
| | | } |
| | | |
| | | // Clear cache |
| | | $this->cache->clear(); |
| | | $this->cache->flush(); |
| | | |
| | | return new WP_REST_Response([ |
| | | 'success' => true, |