Do I understand problem correctly?
[QR1] -> Scan -> [Claim listing] -> [QR1->QR2 claimed] -> [QR2]
Here what comes to mind
class RenderPage
function gen_qr(is_claimed)
if (is_claimed) return generate_qr2;
else return generate_qr1
function display_page()
$qr_code = gen_qr(get_option('<page_id>_qr'));
// on button click update_option('<page_id>_qr')
It’s a bit schematic, but I think you got the idea.
P.S. Just to clarify. Method display_page() renders page withrespect to the fact if listing is claimed (whatever that mean :D), it also has button, that sets “listing claimed” tag to database. qr_gen() generates code that will contain required information based on database option for corresponding page.
Related Posts:
- WordPress 4.8.1 php getting commented
- Finding the screen id of a page generated with add_menu_page
- Issue running db create table query from static method
- Can i add custom code in Source, Header from function.php?
- How to make multiple admin pages for one plugin?
- Problem with isset and $_POST
- Allowing users to Sign-up > Login > Post articles that need approval
- Timed content and flagging content as viewed by user?
- Use $variable from file1.php in file2.php (different file paths)
- Redeclare function after plugin activation
- get_edit_post_link() not working on wp-cron
- Woocommerce Backend Search by Title and SKU
- Control page content visibility based on URL parameter
- WooCommerce Shopping Cart Not Initially Showing Products [closed]
- How to include a custom field in the woocommerce email?
- How to translate wordpress error message
- Override a Plugin Function
- All custom widgets are not showing in widget area at the same time
- Adding a simple Javascript file with a plugin
- How to add/change (woocommerce) product tab icon
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- I want to generate the pdf and save it in library?
- Add key and value to an array in another file
- Wierd site output [closed]
- How to write to a separate PHP file in plugin settings
- Get post content from outside the loop with plugin shortcode usability
- Trying to make a simple wordpress plugin, having difficulties understanding how to make it?
- wordpress plugin license issue -New plugin development
- Create “new pages” within the admin section of plugin
- Dynamic Image Replacement through call rail phone call tracking plugins in wordpress
- How can I show registration form inside modal?
- More gentle way to hook WordPress custom url
- How to display results from a data table with an encrypted user id?
- add_action for publish_post doesn’t work
- How to proper escape echo inside a javascript tag
- How to Call Specific .PHP file on add_submenu_page selection in Plugin Development?
- Checkbox show / hide output result
- Custom Logo Link WordPress
- How to convert Currency from USD to other IP Based currency in Php function
- How do I reinit WordPress plugins dynamically using jS?
- Attempting to list all product categories and the price range of all products within them
- WP Import All Multiple Dynamic Link Imports
- admin_notices show after load completed
- WordPress + python integration
- Newbie problem with adding include wp_footer
- Creating an array from form inputs before it is posted to the options database
- Plugin which unlock free gift when you reach some amount in cart
- is there a way to display product gallery images via cdn
- Hide content for specific users with id
- adding dynamic/multiple slug values in ‘option_none_value’
- How to assign a specific service to a specific provider based on location
- How can I create a secure file download in WordPress?
- How can I see $post object in frontend from functions.php?
- make p tag collapsed after 3 rows
- Content disappears when searching with Search & Filter plugin
- I can’t view the orders on the woocomerce dashboard with the brainblocks plugin
- Woocommerce – Change variations output
- WordPress Plugin PHP Not Calling Function
- load plugin in code snippet
- Generate and send ICS file through WordPress
- Is admin section completely customizable in terms of styling?
- Add Cancel Button to a Custom Meta Box
- WP Plugin permissions – create new files
- Run a Change Role Cron Job on WordPress via cPanel
- How to display variables from plugin?
- How to make the first letter of a post title uppercase, in a plugin?
- How to echo meta_key in easy digital downloads receipt (Purchase Confirmation page)
- Plugin error “array_key_exists(): The first argument should be either a string or an integer” [closed]
- Creating Admin Submenu Page via Class Method
- .htaccess file doesn’t work, with hundred tries
- How to change the product short description for each product with PHP?
- I want add repository theme folder
- “Listen” button on my main post page
- ACF Repeater Field Question [closed]
- How to create a dashboard for logged-in users with custom functionality? [closed]
- Add Flatr button to Sharing option
- plugins_loaded action is not working properly
- Creating a user ‘add custom field’ section
- WordPress Settings – Custom Button actions
- Cannot access variables within a widget
- How do I convince this button to do something when it is clicked?
- WordPress function to add text
- TheCartPress plugin – Make every item in store unique
- Carrying information from button click into form [closed]
- Postal address auto-complete on profile page
- Doing action based on input from options menu
- Insert dynamic content into posts
- avatar displays outside of targeted area
- WordPress Related Plugin – Adding an image
- WordPress User Frontend Editing Custom Fields
- ACF: Hide a div or template section when a custom field (in a field group) is empty
- How to delete remain data in WP database after deleting custom post via admin interface
- My wordpress site wont load, it gives header error warnings
- Can anyone see a syntax error in this? [closed]
- Populate Woocommerce order notes with custom field value
- Woocommerce Product Add-ons – Auto-select first option
- Strict Standards: Non-static method in sidebar generator
- Fast Tranfering my WordPress site to another server
- Duplicating wordpress install issue
- Shortcode returning specific content of a post