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 | |
/** | |
* Subscribe via Mailchimp | |
*/ | |
//Your function name must start with acf_fb_custom_actions_ | |
function acf_fb_custom_actions_subscribe_via_mailchimp($data) { | |
//We already had $data - you can var_dump() to see what is inside | |
if ( is_null($data) ) | |
return; |
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
// Find this file class-tm-epo-fields-upload.php | |
// Find this line $upload = TM_EPO()->upload_file( $_FILES[ $this->attribute ] ); | |
// Replace with following snippet | |
$ext = strtolower( pathinfo( $_FILES[ $this->attribute ]['name'], PATHINFO_EXTENSION ) ); | |
if (in_array($ext, array('jpg','png','gif', 'bmp'))){ | |
$upload = TM_EPO()->upload_file( $_FILES[ $this->attribute ] ); | |
} | |
else { |
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
add_action( 'woocommerce_before_order_notes', 'music_select' ); | |
function music_select($checkout) { | |
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) { | |
$product_id = $cart_item['product_id']; | |
$product_name = $cart_item['data']->post->post_title; | |
woocommerce_form_field( 'music_select_'.$product_id, array( | |
'type' => 'select', |
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 | |
/** | |
* Get active languages in WPML | |
* @return array | |
* @since 1.0 | |
*/ | |
public static function wct_get_languages(){ | |
$languages_arr = array(); | |
$wct_wpml = get_option('wct_wpml'); |