• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

REQ Plugin Shortcoder PRO - Create Shortcodes for anything

darapati27

Member
May 4, 2022
90
39
18
Request Shortcoder PRO - Create Shortcodes for anything

heh.JPG These features are

Available only in the PRO version which further enhances the shortcoder experience.

1. Edit using Block Editor or Page Builder Plugins*
2. Find where your Shortcodes are Inserted
3. Support for Revisions
4. Include Extra Code in the Footer

Sales page:


Free version, wordpress official:
 
Very good plugin, add the following code as a snippet to your wp installation to add full woocommerce intergration to Shortcoder free edition:

Schermopname 22-03-2023 om 18.10.41 PM.png

PHP:
function shortcoder_woocommerce_params( $params ){
    
    $params['wc_info'] = array(
        'name' => __( 'WooCommerce information', 'shortcoder' ),
        'icon' => 'cart',
        'params' => array(
            'sku' => __( 'Product SKU', 'shortcoder' ),
            'price' => __( 'Product price', 'shortcoder' ),
            'regular_price' => __( 'Product regular price', 'shortcoder' ),
            'sale_price' => __( 'Product sale price', 'shortcoder' ),
            'short_description' => __( 'Product short description', 'shortcoder' ),
            'product_image' => __( 'Product image', 'shortcoder' ),
            'product_categories' => __( 'Product categories', 'shortcoder' ),
            'product_tags' => __( 'Product tags', 'shortcoder' ),
            'product_brands' => __( 'Product brands', 'shortcoder' ),
        )
    );
    
    return $params;
}

function shortcoder_woocommerce_metadata( $metadata ){
    
    global $post;
    
    $product = wc_get_product( $post->ID );
    
    if( !$product ){
        return $metadata;
    }
    
    $brands = get_the_term_list($post->ID, 'product_brand');
    if( !$brands || is_wp_error( $brands) ){
        $brands = '';
    }
    
    $metadata[ 'sku' ] = $product->get_sku();
    $metadata[ 'price' ] = $product->get_price();
    $metadata[ 'regular_price' ] = $product->get_regular_price();
    $metadata[ 'sale_price' ] = $product->get_sale_price();
    $metadata[ 'short_description' ] = $product->get_short_description();
    $metadata[ 'product_image' ] = $product->get_image();
    $metadata[ 'product_categories' ] = wc_get_product_category_list($post->ID);
    $metadata[ 'product_tags' ] = wc_get_product_tag_list($post->ID);
    $metadata[ 'product_brands' ] = $brands;
    
    return $metadata;
    
}

function shortcoder_woocomerce_init(){
    if ( ! function_exists( 'is_woocommerce_activated' ) ) {
        add_filter( 'sc_mod_wp_params', 'shortcoder_woocommerce_params' );
        add_filter( 'sc_mod_metadata', 'shortcoder_woocommerce_metadata' );
    }
}

add_action( 'init', 'shortcoder_woocomerce_init' );

?>


if you don't know how to add code snippet, i wrapped it up in a plugin is it allowed to post link?
 
  • Like
Reactions: Karltoto
New version
Updated on Aug 24, 2023

6.3​

  • PRO: Custom editor preview works only for editor authors.
  • New: Set default value for the custom field parameters.
  • New: Custom parameter default value is shown in the insert shortcode popup.
  • Fix: Restrict access to admin-ajax calls.
  • Fix: Some admin texts were missing translation.
  • Fix: Removed the note in the insert popup for fully closed shortcode.
  • Fix: Debug comment line now has the name of the shortcode.
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock