Advertisement
wclovers

Untitled

Jan 14th, 2022
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.22 KB | None | 0 0
  1. /*Catálogo*/
  2. function apg_campo_catalogo( $general_fields, $vendor_id ) {
  3.     $vendor_data   = get_user_meta( $vendor_id, 'wcfmmp_profile_settings', true );
  4.     if ( isset( $general_fields[ 'store_name' ] ) ) {
  5.         $catalogo   = isset( $vendor_data[ 'catalogo' ] ) ? esc_attr( $vendor_data[ 'catalogo' ] ) : '';
  6.         $general_fields[ 'catalogo' ]= [
  7.             'label'         => __( 'Catalog', 'wc-frontend-manager' ) ,
  8.             'type'          => 'upload',
  9.             'class'         => 'wcfm-text wcfm_ele',
  10.             'label_class'   => 'wcfm_title wcfm_ele',
  11.             'value'         => $catalogo,
  12.             'mime'          => 'Uploads'
  13.         ];
  14.         $produccion = isset( $vendor_data[ 'produccion' ] ) ? esc_attr( $vendor_data[ 'produccion' ] ) : '';
  15.         $general_fields[ 'produccion' ]= [
  16.             'label'         => __( 'Production time', 'wc-frontend-manager' ) ,
  17.             'type'          => 'text',
  18.             'class'         => 'wcfm-text wcfm_ele',
  19.             'label_class'   => 'wcfm_title wcfm_ele',
  20.             'value'         => $produccion
  21.         ];
  22.     }
  23.     return $general_fields;
  24. }
  25. add_filter( 'wcfm_marketplace_settings_fields_general', 'apg_campo_catalogo', 50, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement