PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Adding custom button to [woot_upsells] table column?

This support system is for all types of the plugins as for premium versions, so for free ones! If you have premium version do not forget in the private data of the request (!!not in the text of the support request!!) after its publishing insert purchase code please (see blue-green button on the right side) and press Save button.
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi there! Thank you so much for this plugin, it's been a huge help in getting our site functionality working as desired.

One thing I was curious about is if there is a way to create a column with a custom button? Specifically this is for [woot_upsells]. I'm using the pods framework and created a field to extend the functionality of the Product post type, where we could add such a button to the product listing. However this field doesn't show up in the main settings page where you can add columns to [woot_upsells].

I know there is [woot_button], but this isn't exactly what I'm looking for as I need the button to appear next to every product in the table row. And from what I see, [woot_button] can't be used to extend other shortcodes, correct?

I feel like there's an easy answer I'm missing here! Thanks for any help. - john

Hello John

I'm not sure if I understood you correctly

To  add upsells -  - result -

Read  this  please -  - you can add any content to the column even [woot_button]

Ah thank you Pablo! This should fix my issue. I'll give that a try and let you know how it goes


Ok!  Great


Hi Pablo! So I've installed the code in your example as follows, and I have the "Ask me" button now showing up! My question is, how could I change this to open the link of whatever product it is associated with? (it's going to be a "View Product" button. Thanks so much :) - john

add_action('woot_profile_extend', function($profile, $action_name) {
    if ($action_name === 'woot_woocommerce_tables') {
        $profile['ask_me'] = [
            'title' => 'Ask Me',
            'order' => FALSE,
            'action' => function($post_id) {
                return WOOT_HELPER::draw_html_item('a', [
                            'href' => 'javascript: new Popup23({iframe:"' . $post_id . '", '
                            . 'allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture", '
                            . 'title:"Ask manager about the product"});void(0);',
                            'class' => 'woot-btn'
                                ], 'Ask Me');
    return $profile;
}, 10, 2);


To get  the  link to  the  product -

$url = get_permalink( $post_id );

and  paste  $url -

Perfecto! Thank again. You rock! - john

Hello  John