As far I understood you want to assign the order number like $order_number = order_generator($email)
inside the widget class.
Yes, you can do it that way unless the order_generator
is in another class. If you order_generator
function is in another class then first you need to instantiate the class then call the method like $instance_of_your_class->order_generator($email)
.
Hope that helps.
Related Posts:
- How to store the_title() into a variable to reutrn the value, not just echo it
- How do I make my function add variables/values to the $post object?
- How to get the registered sidebar’s name by its id?
- Cleanest/Fastest way to avoid calling and retrieving data from the database multiple times?
- display most popular tags in two columns
- How do I know what variables are passed in a filter/action and what their meaning is?
- WordPress menu deletes when trying to add a hook
- Get widget settings function?
- javaScript in section of WP API
- Add before_content and after_content to register_sidebar
- PHP Deprecated: WP_RSSjb has a deprecated constructor
- Count the number of times the search form template gets included on a page
- Get value from shortcode to do something
- Adding a widget function into the php theme file
- Widget back end radio button issue
- Creating WordPress Shortcode with Variable
- My website is not showing Footer section
- Changing the order of custom fields in the dashboard for Woocommerce variable products [closed]
- How to reference PHP in Javascript
- Overide Variable in Child Theme
- How to get post category list as select in front-end?
- Show different website layout if no sidebar added
- Add a select-option to the default widgets
- How to send a php var to jQuery Ajax call with two different file
- How a HTML form can trigger a PHP function?
- Custom global variable not working in function
- Best way to use variables in multiple functions?
- Trying to add some custom text into WordPress Post title via function.php
- How do I fix Undefined variable using $_POST in function?
- is_user_logged_in() not working in homepage
- Customizing the output of the archive and category widget without altering the original behavior of the widget
- Add disclaimer before certain posts and pages
- Pulling a variable into the wp_nav_menu function
- How can the searchform.php know if it’s used on a registered sidebar id ‘sidebar-1’ or ‘sidebar-2’?
- Where can I find the declaration of `$_wp_theme_features`?
- WordPress – registering sidebar and adding a button directly after .textwidget
- List sibling pages widget, exclude current page
- WP Debug enabled Undefined index error in a widget
- Error Warning: Declaration of description_walker::start_el after PHP upgrade [duplicate]
- Displaying Logged-In User Name in WordPress Menu
- Autoloading in Child Theme
- Set media upload attachment link to none and hide it in WP v3.5
- add_rewrite_rule with bottom priority doesn’t handle the WordPress pages
- How to add default images into theme customizer image control?
- Successful or Error Message after running mysql code in functions.php
- How can one utilize a variable as a callback function name for add_settings_field
- Custom Logo URL | Help me print the URL of the custom logo I inserted into my theme
- I can’t get my custom widget area to show on my WordPress site
- How to run PHP code in Text Widget with no plugin in WP 4.4
- Pass PHP variable to JavaScript without inline JS
- PHP code inside shortcodes
- Adding Default Settings to Theme My Login plugin
- Extending the WP_Widget_Text class
- Set the background to a default image if there isn’t a specified “featured image”
- Calling directories to load in wordpress
- WordPress Access allowed to fewer pages till user logs in
- Use DOMDocument with ob_start breaks my HTML code
- different id for same element visual composer [closed]
- Tax query in pre_get_posts not working
- trigger html cleanup for all posts
- get widget number from array dynamically
- Validation algorithm in checkout field
- Catchable fatal error: Object of class stdClass could not be converted to string after WP 4.7
- If has $title in widgets
- Add class to group inner container
- Illegal string offset in PHP function
- Displaying text if post was within 5 hours
- Adding a tag_ID column into Categories inside the admin dashboard?
- Automatically Add Page Links to Nav Menu
- blank white page when post/update/change option etc
- Must filter functions receive all arguments passed to them?
- How to Display a List of Child Pages For a Parent Page in WordPress
- Displaying Slider in Front Page (home) using Customizr Theme
- How to add PHP pagination to wordpress
- Taxonomy term description with style, only if the description exists?
- How to change the author box selection on a post to a custom taxonomy
- copy fields value to another field
- not outputting medium size image URL
- Get parent category name when only child category is applied to a product
- Can an AJAX callback function access a PHP variable which was defined during initial page load?
- Before & After Content – After Content directly below Before Content when using require_once
- Cannot fetch posts with certain ‘product_cat’. WP_Query is empty
- Detect what link user clicks and Redirect to a specific page for logged in users only
- How fix error in the WordPress loop?
- Use WP_Query Data In Cookie
- Extend the WP_Customize_Image_Control class to change its non-frame $button_labels
- ISOTOPE – Missing/Invalid Arguement Get Terms
- Showing all post from all post type in admin backstage
- Pagination not displaying
- Setting WooCommerce currency programmatically
- Masking external links with internal link for member-only
- Shortcode to include PHP file, pass various parameters to include?
- Why can’t I include echo inside a variable? [closed]
- Alternative to php echo within code
- Add multiple HTML attributes to an Elementor button
- Automatically change insurance quantity based on cart total [closed]
- /page/2/ redirect to 404
- How to pass value to add_filter wpcf7_form_tag from another function?
- How to edit a widget code?
- hiddenQuestions.find is not a function