WordPress SSL (https) is not working with custom permalink

Make sure mod_rewrite is enabled as Apache module. It’s not needed when plain permalinks are used, but you have the opposite situation.

Also, don’t lose any of incoming link juice and redirect with HTTP Status 301 everything and everybody to the HTTPS version of the site. Add to .htaccess file before (or inside) the WordPress section:

RewriteEngine On
# The following lines are essential
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

And don’t forget to set up the SSL for Check Out pages in the WooCommerce settings.