'1814', 'slug' => 'acf-for-woocommerce-product', 'type' => 'plugin', 'public_key' => 'pk_51521a906f2dc207465f1c37cf0a0', 'is_premium' => true, 'has_addons' => false, 'has_paid_plans' => true, 'trial' => array( 'days' => 7, 'is_require_payment' => true, ), 'menu' => array( 'slug' => 'afwp', 'first-path' => 'admin.php?page=afwp', ), 'is_live' => true, ) ); } return $afwp; } // Init Freemius. afwp(); // Signal that SDK was initiated. do_action( 'afwp_loaded' ); if ( afwp()->is__premium_only() ) { if ( afwp()->is_plan( 'pro', true ) || afwp()->is_trial() ) { define( 'AFWP_PREMIUM', true ); } } add_action( 'init', 'afwp_load_textdomain' ); /** * Load plugin textdomain. * * @since 1.0.0 */ function afwp_load_textdomain() { load_plugin_textdomain( 'afwp', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); } if ( is_admin() ) { require_once AFWP_PATH . 'admin-functions.php'; } add_action( 'woocommerce_product_meta_end', 'afwp_product_meta' ); function afwp_product_meta() { if ( class_exists( 'Acf' ) ) { $fields = get_field_objects(); //var_dump( $fields ); if ( $fields ) { foreach ( $fields as $field_name => $field ) { if ( $field_name == '' ) { continue; } ?>   is__premium_only() ) { if ( afwp()->is_plan( 'pro', true ) || afwp()->is_trial() ) { switch ( $field['type'] ) { case 'post_object': ?> post_title ; ?>

<?php 
                            echo  $image['alt'] ;
                            ?> ID ) . '">' . $sub_field->post_title . ''; } ?> term_id ) . '">' . $sub_field->name . ''; } } } elseif ( is_object( $field['value'] ) ) { $sub_field = $field['value']; $output_array[] = '' . $sub_field->name . ''; } elseif ( is_numeric( $field['value'] ) ) { $sub_field = get_term_by( 'id', intval( $field['value'] ), $field['taxonomy'], OBJECT ); $output_array[] = '' . $sub_field->name . ''; } echo implode( ', ', $output_array ) ; break; case 'user': if ( $field['field_type'] == 'select' ) { ?>
' . $sub_field['user_avatar'] . '
' . $sub_field['display_name'] . ' '; } echo '
' . implode( '

', $output_array ) ; } break; case 'color_picker': ?>