If you’ve ever used the force SSL admin/login configuration in WordPress with a self signed SSL certificate and are then using admin-ajax.php for processing ajax requests on the front end you *might* have noticed the ajax functionality breaks for non logged-in users.
When a user typically visits a page using self signed SSL certificate the users web browser will typically pop up an alert window exclaiming the the websites certificate is invalid and require the user to manually choose whether or not to continue (and save the decision for later visits).
In the case of an ajax request, if the user hasn’t previously visited a page on the site using https and has not already chose to continue using the site anyway, the user doesn’t get the chance to choose to continue so the request fails.
To get around this you’ll typically need to either:
- Fork out the dollars for a non self signed / verified SSL that doesn’t need to manually approved;
- Disable the force ssl admin/login configuration (which I wouldn’t recommend if you have previously made the decision to use it); or
- You can update your code to point to the non-ssl (http) url for the admin-ajax.php script. Depending on how the admin-ajax.php script is referenced it might be as simple as changing “https” to “http” in a string or in cases where the admin_url() function is used you can set the scheme parameter to “http” e.g.
admin_url( 'admin-ajax.php', 'http' );
I’m a little bit late to the party posting about teaming up with the crew @Prospress on the WooCommerce One Page Checkout but better later than never right?
Late October last year (together with the awesome guys at Prospress – creators of the WooCommerce Subscriptions extension) we released the WooCommerce One Page Checkout extension. The idea behind the extension is to make a more streamlined (super fast) purchase process for customers of WooCommerce powered stores.
Stats show that 1 in 10 people who abandon their cart do so because the checkout process is too long (from polls like this one). So our main aim is to reduce cart abandonment by offering the entire purchase process on a single page.
With the extension you essentially have the ability to create special pages where customers can choose products, checkout & pay all on the one page!
Some of the features include:
- One Page Checkout displays product selection and checkout forms on a single page. Customers can add products to an order (or remove them) and complete payment without leaving the page.
- You choose the products to display on each checkout page. Create a page for just the one featured product, a few related products for a promotion, or your store’s entire catalog.
- You can also create multiple unique landing pages for special events, promotions or select customers. Add the shortcode to any page (or post) and add your content above the shortcode to display unique sales copy before the purchase process.
- One Page Checkout includes several built-in templates, including a simple pricing table and list of products. Choose the template most suited to your page or if the built-in templates don’t fit your needs, create a custom template.
If you run a WordPress powered WooCommerce store you can grab yourself a copy over at the WooCommerce Extensions cataglog.
I’m a big fan of the Members plugin by Justin Tadlock. It builds upon the core WordPress user role and capability functionality in a clean and robust way that makes it my go-to choice when setting up simple membership based sites for clients.
The plugin itself provides some super handy features including:
- Role Manager: Allows you to edit, create, and delete roles as well as capabilities for these roles.
- Content Permissions: Gives you control over which users (by role) have access to post content.
- Shortcodes: Shortcodes to control who has access to content.
- Widgets: A login form widget and users widget to show in your theme’s sidebars.
- Private Site: You can make your site and its feed completely private if you want.
Whilst working on or a few sites I’ve often needed to extend upon this feature set by providing site managers/admins (call them what you will) with the ability to:
- Hide the menu items of pages/post which have been restricted to certain users (by role) – so that if a user doesn’t have access to a particular page it isn’t visible in the menu structure.
- Hide individual widgets for certain users (by role) – so that if a user doesn’t access to view the widget its simply not visible in the sidebar/widgetized area.
Pretty useful features right? Well because they’ve been so useful for me I’ve bundled each up into their own plugins and made them available through github:
One day when I get a chance I’ll probably reach out to Justin and submit a pull request to the main Members github repo to bundle these couple of features into the main plugin (as options for the content permission feature) – but for the time being I’m happy just considering these as prototypes to determine popularity (much in the same way the core developers now develop a lot of the additional WordPress functionality as standalone plugins before merging with core).
Hope you find these useful.
We’ve had the pleasure to work with a few Australian Federal Government Departments over the last few years on WordPress projects and part of this work has been ensuring our work meets the requirements set in the government web guide.
One such mandatory requirement is the implementation/use of the Australian Government Locator Service (AGLS) Metadata Standard.
To help with this we put together a Simple AGLS plugin which we’ve open sourced and made available on Github.
About the Plugin
The main goal for the plugin is to make it easy for site admins to add AGLS metadata to their site and meet the minimum requirements with little fuss.
- Automatic – Automatically inserts smart defaults out of the box to get you started.
- Defaults – Ability to set sitewide default values.
- Meta Box – Set values on a per post/page basis for granular control over the meta tags.
- Filters – Not happy with some of the output – simply write your own filter to change the tags.