What’s the correct way to add capabilites to user roles?

A third-party plugin adds the capability ‘edit_booked_appointments’. I’d like to assign this capability to the already existing user role ‘editor’. I created the following function in my child theme: function add_booking_role_to_editor() { $role = get_role( ‘editor’ ); $role->add_cap( ‘edit_booked_appointments’, true ); } add_action( ‘init’, ‘add_booking_role_to_editor’); As far as I understand the whole topic, user roles…

Details

Magento 2.3.3 : Requested store not found (for logged user)

Normally, the switch between stores works without problems. This is the result when I’m switching from kids to women: exemple.com/kids/clothes -> before switch exemple.com/women -> after switch But when someone is logged and on a category page the switch does not work: exemple.com/kids/clothes -> before switch exemple.com/women/clothes -> after switch, women doesn’t have this category…

Details

Why my validator is not validating? Laravel

Why my validator is not validating the input-email, it accepts anything! This is my controller to update database. The name in form is correct public function atualizar(Request $req){ $erros = [ ’email’ => ‘Introduza um e-mail válido!’ ]; $validator = Validator::make($req->all(), [ ‘input-email’ => ‘nullable|required_with:input-email|email:rfc,dns,filter’ ],$erros); if ($req->has(‘input-email’)) { $inputEmail = $req->input(‘input-email’); } if (!isset($inputEmail)){…

Details