PHP code example of wpdesk / wp-show-decision

1. Go to this page and download the library: Download wpdesk/wp-show-decision library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wpdesk / wp-show-decision example snippets


public function shouldDisplay(): bool;

use WPDesk\ShowDecision\GetStrategy;

$strategy = new GetStrategy(
	[
		[ 'page' => 'wc-settings', 'tab' => 'shipping' ],
		[ 'page' => 'my-plugin' ],
	]
);

if ( $strategy->shouldDisplay() ) {
	// Show something.
}