/** * Save model. * * Only saves if is not admin user and not a visitor. * Don't save automatically assigned visitor/system memberships. * * @since 1.0.0 * @api */ public function save() { do_action('ms_model_relationship_save_before', $this); if (!empty($this->user_id) && !MS_Model_Member::is_admin_user($this->user_id)) { if (!$this->is_system()) { parent::save(); parent::store_singleton(); } } do_action('ms_model_relationship_after', $this); }
/** * Save model and move the object to the singleton cache if required. * * @since 1.0.0 */ public function save() { parent::save(); parent::store_singleton(); }
/** * Save model. * * @since 1.0.0 */ public function save() { // Validate the pay_date attribute of the invoice. $this->validate_pay_date(); parent::save(); parent::store_singleton(); }