yankiara
Forum Replies Created
-
I actually created a simple shortcode to achieve what I needed:
function aiva_custom_um_shortcode_show_content_by_diploma( $atts = array() , $content = ” ) {
global $user_ID;if ( ! is_user_logged_in() ) { return; }
$a = shortcode_atts( array(‘diploma’ => ” ), $atts );
if ( ! $a[‘diploma’] ) return;um_fetch_user( $user_ID );
$diploma = um_user( ‘diplome’ );
if ( ! $diploma ) return;if ( $diploma == $a[‘diploma’] ) return do_shortcode( $content );
else return;}
add_shortcode( ‘aiva_show_student_content’, ‘aiva_custom_um_shortcode_show_content_by_diploma’ );Thx, bye.
Hi,
Any feedback on this issue?
Thx !
I’ve already tried this, but it doesn’t work for login page, even on a fresh install of WordPress and Ultimate Member.
It’s OK for a classic page, though.
Hi, I finally found the hook ??
So for people interested, here’s my new checkbox view (paste this on your functions.php file) :
add_filter( 'um_view_field_value_checkbox', 'my_view_field_value_checkbox', 10, 2 ); function my_view_field_value_checkbox( $output, $data ) { $selection = $output; $output = ''; $options = $data['options']; foreach ($options as $k => $v) { $v = rtrim( $v ); if ( strpos ( $selection, $v ) !== FALSE ) { $active = 'active'; $class = "um-icon-android-checkbox-outline"; } else { $active = ''; $class = "um-icon-android-checkbox-outline-blank"; } $output .= '<label class="um-field-checkbox ' . $active . ' um-field-radio-state-disabled">'; $output .= '<span class="um-field-checkbox-option">' . __( $v, 'ultimate-member' ) . '</span>'; $output .= '<span class="um-field-checkbox-state"><i class="' . $class . '"></i></span>'; $output .= '</label>'; } return $output; }
OK !
Actually I would like to add conditions to a group of fields without having to do it for each one… how can I do that ?Forum: Plugins
In reply to: [WooCommerce] [Bug] Attributes Not Getting Imported in CSV Product ImporterThank you,
My bad, hadn’t searched in the right place.Forum: Plugins
In reply to: [WooCommerce] [Bug] Attributes Not Getting Imported in CSV Product ImporterI already have the latest WooCommerce installed.
But I downloaded the file you used to import attributes, and I figured out that the french translation of the “Attribute 1 value(s)” label was preventing import to work, because the english label does work.
So now I can import products with one CSV file, then global attribute for every product with another CSV file (can’t do it with the same, don’t understand why, but not a big deal), then variations for every products with another CSV.
The problem is I can’t work out setting the attribute value for the variations. I tried to add them in the last CSV file. Attribute value still undefined. And I tried to use a fourth CSV file to set the variations attribute value. Still nothing.
Precision : I used “XXXX” SKU for products, then XXXX-1, XXXX-2 for variations. I tried to import “XXXX-1,ATTR_NAME,ATTR_VALUE”.
Have you managed to do so ?
Is there documentation for this import functionnality ? Couldn’t find it…
And thx for your quick answer !
Forum: Plugins
In reply to: [WooCommerce] [Bug] Attributes Not Getting Imported in CSV Product ImporterHi divijc,
Have you found a solution to the attribute import issue ?
I’m stuck with the same problem for my future e-commerce.
Thanks.