Welcome, Guest. Please login or register.

Author Topic: Set all products virtual woocommerce  (Read 1504 times)

0 Members and 1 Guest are viewing this topic.

Offline Vipe

  • Hero Member
  • *****
  • Posts: 1745
  • Reputation: +124/-416
  • Gender: Male
  • www.vipe.ro
    • View Profile
Set all products virtual woocommerce
« on: June 09, 2015, 12:01:28 PM »
E ciudata treaba. am 6000 de produse pe care vreau sa le setez ca produse virtuale. Nu gasesc nici o posibilitate in afara de a edita pe fiecare in parte.
Aveti o alta idee?

ArenaWeb

Set all products virtual woocommerce
« on: June 09, 2015, 12:01:28 PM »

Offline RaouL

  • Simply the Best!
  • Hero Member
  • *****
  • Posts: 1371
  • Reputation: +207/-65
  • Gender: Male
  • Fuck me, I'm Famous!
    • View Profile
Re: Set all products virtual woocommerce
« Reply #1 on: June 09, 2015, 05:12:38 PM »
Adauga asta in functions.php
Code: [Select]
function cs_wc_product_type_options( $product_type_options ) {
    $product_type_options['virtual']['default'] = 'yes';
    $product_type_options['downloadable']['default'] = 'yes';
    return $product_type_options;
}
add_filter( 'product_type_options', 'cs_wc_product_type_options' );

Offline Vipe

  • Hero Member
  • *****
  • Posts: 1745
  • Reputation: +124/-416
  • Gender: Male
  • www.vipe.ro
    • View Profile
Re: Set all products virtual woocommerce
« Reply #2 on: June 10, 2015, 02:28:02 PM »
Adauga asta in functions.php
Code: [Select]
function cs_wc_product_type_options( $product_type_options ) {
    $product_type_options['virtual']['default'] = 'yes';
    $product_type_options['downloadable']['default'] = 'yes';
    return $product_type_options;
}
add_filter( 'product_type_options', 'cs_wc_product_type_options' );

functions din tema?

Offline RaouL

  • Simply the Best!
  • Hero Member
  • *****
  • Posts: 1371
  • Reputation: +207/-65
  • Gender: Male
  • Fuck me, I'm Famous!
    • View Profile
Re: Set all products virtual woocommerce
« Reply #3 on: June 16, 2015, 05:13:19 PM »
Da

Offline Vipe

  • Hero Member
  • *****
  • Posts: 1745
  • Reputation: +124/-416
  • Gender: Male
  • www.vipe.ro
    • View Profile
Re: Set all products virtual woocommerce
« Reply #4 on: June 22, 2015, 09:18:30 AM »
imi da eroare.
Fatal error: Call to undefined function add_filter() in /home/sitevechi/public_html/wp-content/themes/Avada/functions.php on line 7

Nu stiu de ce dar nu apar ni categorie daca nu le setez ca produse virtuale. Am modul catalog activat. Nu se vand produsele pe site!
« Last Edit: June 22, 2015, 10:07:51 AM by Vipe »