I have a question about integration e.g. Woocommerce with external app.
What is the best and safe method to accomplish this goal?
Woocommerce has REST API but it might be quite vulnerable and will not show anything (products etc.) to non logged user(which is understandable).
Only safe idea that's comes to my mind is creating scripts inside WordPress and access them via AJAX but I'm worrying about performance of this method.
Maybe there is a right way that I'm not familiar with?
For that purpose, you should create an API from scratch of the wordpress database. wordpress databse has all of you need in a good way and only some php codes needed to create and execute the API. then in you app with AJAX you should access that.
this link may help you:
https://developer.okta.com/blog/2019/03/08/simple-rest-api-php
The right way is likely creating your own API if you don't want to use Woocommence's one. That means you make a plan of what you need to expose, all the routes and start building the API. I warmly recommend the book by Phil Sturgeon - Build APIs you won't hate. The author is also a co-founder of https://phptherightway.com/ so it's quite reputable.
Related
Hello stackoverflow friends 🙂
I want to make a portal in wordpress with the Zabbix API. Can I do it in the WordPress platform itself or do I have to write the code elsewhere?
Is this possible?
Does anyone ever tried to do this kind of stuff?
Is there a plugin to call APIs?
I really need an answer to know if it is possible to do this type of things or if I need to look for another type of CMS’s.
Thanks and good work!
Yes it is possible to use that API in WordPress. You can create it as a plugin. Here's more details on how to create a plugin, from the official documentation : https://developer.wordpress.org/plugins/
To make the API calls, have a look at the HTTP API : https://developer.wordpress.org/plugins/http-api/
To do database interactions(like saving the data to your db or fetching it), have a look at the wpdb class : https://developer.wordpress.org/reference/classes/wpdb/
If you want to run cron jobs (scheduled tasks), please have a look at the WP-Cron: https://developer.wordpress.org/plugins/cron/
There are several built functions, hooks and classes in WordPress that will aid you. Just go through the developer documentation provided by WordPress.
I have this problem that our primary news site is already running on wordpress. Due to the editorial workflows and some new projects, i am checking ezpublish. But I want to keep wordpress frontend and want to attach it to ezpublush. So content that gets generated in ezpub can be published live into wordpress. I find extensions are very limited so wondering has anything been worked upon this direction.
If you really want to keep on using Wordpress for your frontend, what about using the REST API to retrieve content from its content repository ?
The REST API provided by the eZ Engineering is just awesome so most of your work will be to develop something on the Wordpress side which will be able to get connected to this API (I don't know WP enough to say if it's something easy or not).
Another solution if you don't want to use the REST API, is to use an XML template in place of the default HTML one. This way, eZ Publish will expose its contents over XML which is more usable than pure HTML...
Pro for the REST API : very fast (in comparison of using the XML solution)
Cons for the REST API : need to develop something dedicated to this WP/eZ bridge on the WP side
Pro for the XML solution : maybe more simple since I'm pretty sure that there are some extension on the WP side which are able to import contents based on XML
Cons : see REST API's Pro
Sorry if it's obvious, but I'd suggest that you do an estimate of moving the design and content to ez so as to establish how much work you can afford to sink into this push idea.
I think that you should look at the workflow support in ez and the onpublish trigger. This will let you hook the content as it's being published in ez and push into wp. The model is going to have some edge cases since the content structure in ez is quite flexible. For example, you're going to need to make some choices about related content, embedded content and images.
The easiest option would be to configure an rss export from eZ and import that rss into WP objects. However I agree with Doug that you would be best using this as a temporary solution with the plan being to replace the Wordpress front end with an eZ front end.
Can anyone recommend an xml rpc library or client for wordpress using java?
I've run into migration hell moving a joomla install to wordpress.
Main reason for wanting to use rpc now is because i will be using it as my primary way of posting to the blog so i'm putting a simple client together and it needs to be configurable enough to allow me to port my joomla posts.
Some posts in future will just be reports generated from a java program as well so, its kinda essential i get something now if possible.
BTW if anyone understands the current wordpress table structure and can advise on how to do direct mysql inserts then i'm open to that too.
thanks in advance.
Have a look at http://code.google.com/p/wordpress-java , I've just added a few features.
I've just posted this link on a different WordPress question:
Database Description from WordPress Codex. That will help you understand WordPress' table structure.
Your project sounds pretty interesting. A quick google search shows some info on Java and XML-RPC: 1, 2 (javax.xml.rpc ).
Second link belongs to Apache XML-RPC, probably a good option for your project.
We all know what Wordpress can do with a little bit of css goodness. I was wondering whether the idea could be extended even further and make a completely separate Flash/Flex frontend for a website, that uses Wordpress in the back. That would certainly be possible. I was just wondering whether its practical. Any progress on the topic ?
http://www.arpitonline.com/blog/2007/03/24/wordpress-in-flexas3/
http://www.asual.com/blog/swfaddress/flex-on-wordpress.html
http://www.wonderhowto.com/how-to-convert-wordpress-adobe-flex-3-application-255415/
very similar question asked on built4flash
http://built4flash.stackexchange.com/questions/178/any-blogging-software-written-in-flex
simply put, it'd have to completely wrap the wordpress, unless you use PHP connection into wordpress routines, but this would be an addon/extension style build and not an integration.
http://flashcms.patrick-segarel.com
Wordpress, Zend Framework and AS3
Wordpress is used as a library item in order to access all the Wordpress functions within the ZF application, the retrieved data is sent to Flash via ZendAmf
I'm looking for a wordpress-like blog interface to put inside a Joomla hosted site. The admin interface of Joomla is quirky enough and hard enough to use that daily updates are infeasible.
What I am looking for is an easy-to-use posting interface that supports multiple users with different accounts/names, a tagging scheme, and easy find by date/user/tag functionality.
In particular I'm looking for a relatively easy-to-deploy, out-of-the-box solution, and would prefer not to hack rss feeds together or write too much custom code. I know there are several extensions out there but they all receive largely mixed reviews... Has anyone used any of these? Or has anyone had experience putting something like this together?
Well you could do this - have a wordpress installation. Get the users to post there and then use the RSS feed from it (or the XML RPC Blogging API) to update the Joomla installation. You will have to write the update piece once, but then all the headache is gone.
I'm not trying to be smart here, but if the admin interface of Joomla isn't working for you, aren't you doing yourself a disservice by trying to patch their UI instead of spending your time looking for a CMS that is easier to manage/a better fit for your user base?
Edit: All of the CMS's I've dealt with in ASP.NET are homegrown. However I'm looking into checking out Umbraco based on the recommendations of two well-respected friends. In the case you presented where you already have content in Joomla and a migration out to another CMS is going to be overkill, I think that vaibhav has got it right. You should look into setting up Wordpress or some other blogging engine and then simply have Joomla consume the content and display it in the Joomla site. I've not done it, but from what I remember of Joomla when I was looking at it, I believe that it would support this.
After doing a bit more research I decided to go with the open source MojoBlog. It was quite easy to install and configure and after a few stalls and hang ups that were resolved via perusal of their forums I was up and running. The edit interface is not ideal but it much better than Joomla admin, and it has multi-user-support, tag categorization, modules for viewing by tag, date, etc. Think it will suffice for my needs in the short term.
We at 'corePHP' have successfully integrated the WordPress and WordPress Multi-User blogging platforms into Joomla!. Please visit us to see what these feature-rich components have to offer you. https://www.corephp.com/wordpress/wordpress-integration-for-joomla-1.5.html
Happy Blogging,
Michael Pignataro
VP of Operations
www.corephp.com