The list of ATOs (schools) which are approved to conduct EASA training overseas is at :
https://easa.europa.eu/easa-and-you/...-organisations
You will notice that there are no schools in Jordon on that list.
There are schools which follow the EASA guidelines and rules but are not approved meaning the training does not count.
For PPL I will need 45 hours, so is it possible to do 40 of those hours in Jordan and the remainder in UK for example?
No, you cannot credit experience from a non EASA course of training, meaning in the scenario you describe you would start from zero at the EASA ATO although with 40 hours previous experience you should complete in minimum hours.
I would suggest you contact one of the ATOs on the EASA list.