enquiry-quotation-for-woocommerce
/
includes
/
class-pisol-enquiry-quotation-woocommerce-activator.php
background.png
1 year ago
banner-sample.php
1 year ago
class-pisol-enquiry-quotation-woocommerce-activator.php
1 year ago
class-pisol-enquiry-quotation-woocommerce-deactivator.php
1 year ago
class-pisol-enquiry-quotation-woocommerce-i18n.php
1 year ago
class-pisol-enquiry-quotation-woocommerce-loader.php
1 year ago
class-pisol-enquiry-quotation-woocommerce.php
1 year ago
conflict-fixer.php
1 year ago
includes.php
1 year ago
index.php
1 year ago
pisol.class.form.php
1 year ago
pisol.class.promotion.php
1 year ago
review-icon.svg
1 year ago
review.php
1 year ago
class-pisol-enquiry-quotation-woocommerce-activator.php
27 lines
| 1 | <?php |
| 2 | |
| 3 | class Pisol_Enquiry_Quotation_Woocommerce_Activator { |
| 4 | |
| 5 | public static function activate() { |
| 6 | add_option('pi_ewq_do_activation_redirect', true); |
| 7 | self::createEnquiryCartPage(); |
| 8 | } |
| 9 | |
| 10 | public static function createEnquiryCartPage(){ |
| 11 | $page_saved = get_option('pi_eqw_enquiry_cart',0); |
| 12 | if($page_saved == 0 || $page_saved == ""){ |
| 13 | $page = array( |
| 14 | 'post_title' => __('Enquiry Cart'), |
| 15 | 'post_type' => 'page', |
| 16 | 'post_content' => '[pisol_enquiry_cart]', |
| 17 | 'post_status' => 'publish', |
| 18 | 'comment_status' => 'closed', |
| 19 | 'ping_status' => 'closed', |
| 20 | ); |
| 21 | $page_id = wp_insert_post($page, false); |
| 22 | update_option('pi_eqw_enquiry_cart', $page_id); |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | } |
| 27 |