conditional-logic-for-woo-product-add-ons
Last commit date
assets
1 year ago
freemius
1 year ago
languages
1 year ago
src
1 year ago
vendor
1 year ago
views
1 year ago
conditional-logic-for-product-addons.php
1 year ago
index.php
1 year ago
license.php
1 year ago
readme.txt
1 year ago
license.php
66 lines
| 1 | <?php |
| 2 | |
| 3 | if ( !defined( 'ABSPATH' ) ) { |
| 4 | exit; |
| 5 | } |
| 6 | if ( !function_exists( 'clfwpao_fs' ) ) { |
| 7 | // Create a helper function for easy SDK access. |
| 8 | function clfwpao_fs() { |
| 9 | global $clfwpao_fs; |
| 10 | if ( !isset( $clfwpao_fs ) ) { |
| 11 | // Include Freemius SDK. |
| 12 | require_once dirname( __FILE__ ) . '/freemius/start.php'; |
| 13 | $clfwpao_fs = fs_dynamic_init( array( |
| 14 | 'id' => '11637', |
| 15 | 'slug' => 'conditional-logic-for-woocommerce-product-add-ons', |
| 16 | 'type' => 'plugin', |
| 17 | 'public_key' => 'pk_bd6b56da7db37dd322941425b35e5', |
| 18 | 'is_premium' => false, |
| 19 | 'premium_suffix' => 'Premium', |
| 20 | 'has_addons' => false, |
| 21 | 'has_paid_plans' => true, |
| 22 | 'trial' => array( |
| 23 | 'days' => 7, |
| 24 | 'is_require_payment' => true, |
| 25 | ), |
| 26 | 'menu' => array( |
| 27 | 'first-path' => 'plugins.php', |
| 28 | 'contact' => false, |
| 29 | 'support' => false, |
| 30 | ), |
| 31 | 'is_live' => true, |
| 32 | ) ); |
| 33 | } |
| 34 | return $clfwpao_fs; |
| 35 | } |
| 36 | |
| 37 | // Init Freemius. |
| 38 | clfwpao_fs(); |
| 39 | // Signal that SDK was initiated. |
| 40 | do_action( 'clfwpao_fs_loaded' ); |
| 41 | } |
| 42 | add_action( 'admin_menu', function () { |
| 43 | // Account |
| 44 | add_submenu_page( |
| 45 | '___freemius', |
| 46 | __( 'Freemius Account', 'conditional-logic-for-product-addons' ), |
| 47 | __( 'Freemius Account', 'conditional-logic-for-product-addons' ), |
| 48 | 'manage_options', |
| 49 | 'clfwpao-account', |
| 50 | function () { |
| 51 | clfwpao_fs()->_account_page_load(); |
| 52 | clfwpao_fs()->_account_page_render(); |
| 53 | } |
| 54 | ); |
| 55 | // Contact us |
| 56 | add_submenu_page( |
| 57 | '___freemius', |
| 58 | __( 'Contact Us', 'conditional-logic-for-product-addons' ), |
| 59 | __( 'Contact Us', 'conditional-logic-for-product-addons' ), |
| 60 | 'manage_options', |
| 61 | 'clfwpao-contact-us', |
| 62 | function () { |
| 63 | clfwpao_fs()->_contact_page_render(); |
| 64 | } |
| 65 | ); |
| 66 | } ); |