Skip to content

Instantly share code, notes, and snippets.

View Yame-'s full-sized avatar

Yannick Van Meerbeeck Yame-

View GitHub Profile
@Yame-
Yame- / capture-data-wpcf7.php
Created June 16, 2015 21:24
Add WooCommerce product with Contact Form 7
<?php
/* Capture CF7 data */
add_action( 'wpcf7_mail_sent', 'wpcf7_capture_data' );
function wpcf7_capture_data( $contact_form ) {
$submission = WPCF7_Submission::get_instance();
if ( $submission ) {
$posted_data = $submission->get_posted_data();
@Yame-
Yame- / gist:d154d574ee7df2f5b3eb
Last active February 26, 2018 14:17
Retrieving billing_first_name, billing_last_name, ... via Sessions - WooCommerce
<?php
/*
Add this code to your functions.php
*/
add_action('woocommerce_checkout_update_order_review', 'get_customer_details');
function get_customer_details($post_data){
global $woocommerce;
// Details you want injected into WooCommerce session.