Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Satheesh Kumar

    (@rsk1592)

    Hurray!!

    I found the solution.

    Add the following code to ./wp-content/plugins/woocommerce-pdf-invoices/functions.php

    function custom_bewpi_mpdf_options( $options ) {
    $options[‘mode’] = ”;
    $options[‘format’] = ”;
    $options[‘default_font_size’] = 0;
    $options[‘default_font’] = ‘dejavusans’;
    $options[‘margin_left’] = 14;
    $options[‘margin_right’] = 14;
    $options[‘margin_top’] = 14;
    $options[‘margin_bottom’] = 0;
    $options[‘margin_header’] = 14;
    $options[‘margin_footer’] = 6;
    $options[‘orientation’] = ‘P’;
    return $options;
    }
    add_filter( ‘bewpi_mpdf_options’, ‘custom_bewpi_mpdf_options’ );

    I tried doing the same , but did not see any file named functions.php in ./wp-content/plugins/woocommerce-pdf-invoices/functions.php

    Please, Help out!!!!!!!!!!!!!!

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You shouldn’t add it to the plugin’s files anyway because you won’t be able to update the plugin in future, or have your modifications erased.

    First create a Child Theme: https://codex.wordpress.org/Child_Themes

    Then put these modifications inside of your Child Theme functions.php file.

    okay,
    I tried it adding to my child theme’s function.php file ..
    but, after i click “update file” it’s getting stuck …
    and entire site is not loading

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you paste here your full child theme functions.php file?

    yeah sure ,
    here it is..

    <?php
    define( 'OPTIONS_SLUG', 'virtue_premium' );
    define( 'LANGUAGE_SLUG', 'virtue' );
    load_theme_textdomain('virtue', get_template_directory() . '/languages');
    /*
     * Init Theme Options
     */
    require_once locate_template('/themeoptions/framework.php');          		// Options framework
    require_once locate_template('/themeoptions/options.php');          		// Options framework
    require_once locate_template('/themeoptions/options/virtue_extension.php'); // Options framework extension
    require_once locate_template('/kt_framework/extensions.php');        		// Remove options from the admin
    
    /*
     * Init Theme Startup/Core utilities
     */
    require_once locate_template('/lib/utils.php');           		            // Utility functions
    require_once locate_template('/lib/init.php');            					// Initial theme setup and constants
    require_once locate_template('/lib/sidebar.php');         					// Sidebar class
    require_once locate_template('/lib/config.php');          					// Configuration
    require_once locate_template('/lib/cleanup.php');        					// Cleanup
    require_once locate_template('/lib/custom-nav.php');        				// Nav Options
    require_once locate_template('/lib/nav.php');            					// Custom nav modifications
    require_once locate_template('/lib/metaboxes.php');     					// Custom metaboxes
    require_once locate_template('/lib/gallery_metabox.php');     				// Custom Gallery metaboxes
    require_once locate_template('/lib/taxonomy-meta-class.php');   			// Taxonomy meta boxes
    require_once locate_template('/lib/taxonomy-meta.php');         			// Taxonomy meta boxes
    require_once locate_template('/lib/comments.php');        					// Custom comments modifications
    require_once locate_template('/lib/post-types.php');      					// Post Types
    require_once locate_template('/lib/Mobile_Detect.php');        				// Mobile Detect
    require_once locate_template('/lib/aq_resizer.php');      					// Resize on the fly
    require_once locate_template('/lib/revslider-activate.php');   				// Plugin Activation
    
    /*
     * Init Shortcodes
     */
    require_once locate_template('/lib/kad_shortcodes/shortcodes.php');      					// Shortcodes
    require_once locate_template('/lib/kad_shortcodes/carousel_shortcodes.php');   				// Carousel Shortcodes
    require_once locate_template('/lib/kad_shortcodes/custom_carousel_shortcodes.php');   		// Carousel Shortcodes
    require_once locate_template('/lib/kad_shortcodes/testimonial_shortcodes.php');   			// Carousel Shortcodes
    require_once locate_template('/lib/kad_shortcodes/testimonial_form_shortcode.php');   		// Carousel Shortcodes
    require_once locate_template('/lib/kad_shortcodes/blog_shortcodes.php');   					// Blog Shortcodes
    require_once locate_template('/lib/kad_shortcodes/image_menu_shortcodes.php'); 				// image menu Shortcodes
    require_once locate_template('/lib/kad_shortcodes/google_map_shortcode.php');  				// Map Shortcodes
    require_once locate_template('/lib/kad_shortcodes/portfolio_shortcodes.php'); 				// Portfolio Shortcodes
    require_once locate_template('/lib/kad_shortcodes/portfolio_type_shortcodes.php'); 			// Portfolio Shortcodes
    require_once locate_template('/lib/kad_shortcodes/staff_shortcodes.php'); 					// Staff Shortcodes
    require_once locate_template('/lib/kad_shortcodes/gallery.php');      						// Gallery Shortcode
    
    /*
     * Init Widgets
     */
    require_once locate_template('/lib/premium_widgets.php'); 					// Gallery Widget
    require_once locate_template('/lib/widgets.php');         					// Sidebars and widgets
    
    /*
     * Template Hooks
     */
    require_once locate_template('/lib/custom.php');          					// Custom functions
    require_once locate_template('/lib/authorbox.php');         				// Author box
    require_once locate_template('/lib/breadcrumbs.php');         				// Breadcrumbs
    require_once locate_template('/lib/template_hooks.php'); 					// Template Hooks
    require_once locate_template('/lib/custom-woocommerce.php'); 				// Woocommerce functions
    
    /*
     * Load Scripts
     */
    require_once locate_template('/lib/admin_scripts.php');    					// Icon functions
    require_once locate_template('/lib/scripts.php');        					// Scripts and stylesheets
    require_once locate_template('/lib/custom_css.php'); 						// Fontend Custom CSS
    
    /*
     * Updater
     */
    require_once locate_template('/lib/wp-updates-theme.php');
    new WPUpdatesThemeUpdater_647( 'http://wp-updates.com/api/2/theme', basename( get_template_directory() ) );
    
    /*
     * Admin Shortcode Btn
     */
    function virtue_shortcode_init() {
    	if(is_admin()){ if(kad_is_edit_page()){require_once locate_template('/lib/kad_shortcodes.php');	}}
    }
    add_action('init', 'virtue_shortcode_init');
    
    function my_wp_nav_menu_args( $args = '' ) {
    
    if( is_user_logged_in() ) {
    	$args['menu'] = 'Logged-In';
    } else {
    	$args['menu'] = 'Main Menu';
    }
    	return $args;
    }
    add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' );
    
    function tml_edit_user_profile( $profileuser ) { ?>
    <p>
    <label for="user_phone">Phone Number</label>
    <input id="user_phone" type="text" name="user_phone" value="<?php echo $profileuser->user_phone; ?>" />
    </p>
    <?php
    }
    add_action( 'edit_user_profile', 'tml_edit_user_profile' );
    
    function tml_user_register( $user_id ) {
    	if ( !empty( $_POST['user_phone'] ) )
    		update_user_meta( $user_id, 'user_phone', $_POST['user_phone'] );
    }
    add_action( 'user_register', 'tml_user_register' );

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    How did you create this file? It shouldn’t be a copy of any other functions.php file, it should be created clean.

    this is the “functions.php” file of my theme..
    what are you asking for?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you create a “Child Theme” as per the above instructions

    okay

    Plugin Author Bas Elbers

    (@baaaaas)

    @devsau did you get it to work? The solution @andrew gave should work. 🙂 Please let me know if I can help you out or if I can close the topic.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Rupee Symbol Problem’ is closed to new replies.