Created
November 23, 2013 20:57
-
-
Save gicolek/7619866 to your computer and use it in GitHub Desktop.
Woo Commerce custom add to cart ajax handler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'woocommerce_ajax_added_to_cart', 'ac_add_product_custom_field' ); | |
/** | |
* | |
* @hook woocommerce_ajax_added_to_cart | |
*/ | |
function ac_add_product_custom_field($product_id) { | |
// check if logo_text has been defined by the client | |
if ( isset( $_POST['logo_text'] ) ) { | |
// do something | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment