Forum Replies Created
- AuthorPosts
- PATselovParticipant
Sorry. Last line of record
Tell me the code for displaying these buttons in any place of the template I need?PATselovParticipantThis code does not work.
The result is an empty array.PATselovParticipantYour code
add_filter( 'wcfm_profile_fields_social', function( $social_fields, $vendor_id ) { $vk = get_user_meta( $vendor_id, '_wcfm_social_vk', true ); $telegram = get_user_meta( $vendor_id, '_wcfm_social_telegram', true ); $viber = get_user_meta( $vendor_id, '_wcfm_social_viber', true ); $social_fields["vk"] = array('label' => __('VK', 'wc-frontend-manager') , 'type' => 'text', 'class' => 'wcfm-text wcfm_ele', 'label_class' => 'wcfm_title wcfm_ele', 'value' => $vk ); $social_fields["telegram"] = array('label' => __('Telegram', 'wc-frontend-manager') , 'type' => 'text', 'class' => 'wcfm-text wcfm_ele', 'label_class' => 'wcfm_title wcfm_ele', 'value' => $telegram ); $social_fields["viber"] = array('label' => __('Viber', 'wc-frontend-manager') , 'type' => 'text', 'class' => 'wcfm-text wcfm_ele', 'label_class' => 'wcfm_title wcfm_ele', 'value' => $viber ); return $social_fields; }, 50, 2 ); add_action( 'wcfm_profile_update', function( $vendor_id, $wcfm_profile_form ) { if( isset( $wcfm_profile_form['vk'] ) ) { update_user_meta( $vendor_id, '_wcfm_social_vk', $wcfm_profile_form['vk'] ); } if( isset( $wcfm_profile_form['telegram'] ) ) { update_user_meta( $vendor_id, '_wcfm_social_telegram', $wcfm_profile_form['telegram'] ); } if( isset( $wcfm_profile_form['viber'] ) ) { update_user_meta( $vendor_id, '_wcfm_social_viber', $wcfm_profile_form['viber'] ); } }, 50, 2 ); add_action( 'wcfmmp_store_after_social', function( $vendor_id ) { $vk = get_user_meta( $vendor_id, '_wcfm_social_vk', true ); $telegram = get_user_meta( $vendor_id, '_wcfm_social_telegram', true ); $viber = get_user_meta( $vendor_id, '_wcfm_social_viber', true ); if( $vk ) { ?> <li><a href="<?php echo wcfmmp_generate_social_url( $vk, 'vk' ); ?>" target="_blank"><i class="fab fa-vk" aria-hidden="true" target="_blank"></i></a></li> <?php } if( $telegram ) { ?> <li><a href="<?php echo wcfmmp_generate_social_url( $telegram, 'telegram' ); ?>" target="_blank"><i class="fab fa-telegram" aria-hidden="true" target="_blank"></i></a></li> <?php } if( $viber ) { ?> <li><a href="<?php echo wcfmmp_generate_social_url( $viber, 'mixer' ); ?>" target="_blank"><i class="fab fa-viber" aria-hidden="true" target="_blank"></i></a></li> <?php } }, 50 );
But there are two problems:
1. During setup during registration, data added to these fields is not saved.
2. The display of the fields does not correspond to the display of the remaining fields in the list. The image is attached.Attachments:
You must be logged in to view attached files.PATselovParticipantOk.
Then tell me how for the seller whose subscription has expired automatically set the status Disable Vendor?PATselovParticipantI created my own post type and fields for it
I have 3 tariff plans Standard, Business, Premium
In my template I want to display some fields only for the Premium group
To do this, to use the “if {} else {};” I need to find out which group the logged in user.
How do I get the value which of the groups the user belongs to?PATselovParticipantNo, you do not understand me.
How can a user group be defined programmatically?
I need, depending on the user group, to work with my data when writing the page template.
For example:<?php if ($my_user_group == ... ) { // My code } else { // My code } ?>
Therefore, I need to get the group value for a user who has logged into his woocommerce account.
PATselovParticipantThis reply has been marked as private.PATselovParticipantNo, I need this as a variable value, so that I can use this value in if else blocks when writing my own template code.
PATselovParticipantFor me, the most convenient option can only be selected by the “Global Attributes” for the selected category or several selected product categories, but they cannot add their own attributes.
PATselovParticipantYes, I already set up groups.
I’m interested in the code so that I can use it in php files when I edit page templates.PATselovParticipantI agree with this idea. It will greatly simplify the setup of the store, it will be especially convenient for working with setting attributes for the category.
PATselovParticipantI am joining.
I also need to remove Twitter, Instagram, Linkedin, Google Plus, Snapchat, PinterestPATselovParticipantLoco Translate plugin doesn’t suit me.
I need a translation that this plugin cannot do. That’s why I do the translation myself.
I need your file to load after my file.PATselovParticipantI see this error when I selected the product and click the Send request button
PATselovParticipantQuotation plugin – https://woocommercequoteplugin.com/ does not work and breaks the session.
His tech support is not responding.PATselovParticipantI’m interested too. This is a very good feature.
- AuthorPosts