Connect WordPress WooCommerce orders using Posts to Posts (fixed)
$100-600 USD
Cancelled
Posted over 10 years ago
$100-600 USD
Paid on delivery
I need a custom WooCommerce function that will connect every new WooCommerce order to an associated post type using Scribu's Post to Post plugin. Everything has a well developed API, I just need you to connect the pieces.
Need to know:
- We will be working with three post types: shop_order, product and campaign
- We will be using two WordPress plugins: WooCommerce and Posts to Posts
- You will be required to work from our test site.
- Please make complete inline comments about what is going on.
- This may not be a complete work order, issues may arise once development starts.
- We will give you extra money to use GitHub. They have great free software.
- We pay in milestones for every couple of hours. We want to ensure that you are on track and
that this project is still a good fit for you.
- We expect you to use Freelancer's visual tracker.
- We give bonuses for high quality work.
Steps:
1) Once a user completes checkout, link their new order with the associated campaigns. The associated campaign is found by calling a function for each product sold that returns the WordPress post id of the campaign associated to the product.
For example say order 301 has two products, A & B. Product A is associated with campaign 1 and product B is associated with campaign 2. So order 301 is to be associated with campaigns 1 & 2.
Use WooCommerce action hook "woocommerce_checkout_order_processed" for this. This snippet may help you get setup: [login to view URL]
2) Once an order is associated with the campaigns of the products purchased create a post meta entry for the order using key "campaign_$pid", where $pid is the post id of the campaign.
The value should be an array of two items counting only products sold relating to that particular campaign:
- value of subtotal (without tax)
- count of products sold
Creating Post to Post connections programmatically...
[login to view URL]
p2p_type( 'YOUR_CONNECTION_TYPE' )->connect( $from_id, $to_id, array(
'date' => current_time('mysql')
) );
Hi there,
We are experts in PHP Open Source (any kind of PHP/MySQL work),wordpress and Ajax/Web 2.0 technology.
Some of the projects we completed for php are mentioned below
https://www.freelancer.com/projects/Linux-Bulk-Marketing/Interspire-Geolocalization.html
https://www.freelancer.com/projects/PHP-HTML.1/Seamless-billing-login-website.html
https://www.freelancer.com/projects/Linux-Bulk-Marketing/Interspire-Geolocalization.html
https://www.freelancer.com/projects/PHP-Linux/Script-Cron-FTP-files.html
Hi,
Thank you for considering our proposal and please contact us for further discussions. Please check your PMB for more details and portfolio. Thanks!
Our core competence is in mobile Application development guaranteed to be delivered on time and within budget. Please see your In-box for further details. Thank you.