Changeset 2709540
- Timestamp:
- 04/14/2022 05:30:30 AM (4 years ago)
- Location:
- product-quotation-for-woocommerce/trunk
- Files:
-
- 49 added
- 11 deleted
- 9 edited
-
.distignore (added)
-
README.txt (modified) (2 diffs)
-
assets/css/pqfw-admin.css (modified) (2 diffs)
-
assets/css/pqfw-frontend.css (modified) (2 diffs)
-
assets/css/pqfw-quotations.css (added)
-
assets/images/loader.gif (added)
-
assets/images/wpspin_light.gif (deleted)
-
assets/js/pqfw-cart.js (added)
-
assets/js/pqfw-frontend.js (modified) (6 diffs)
-
autoload.php (modified) (1 diff)
-
includes/Bootstrap.php (deleted)
-
includes/Classes/Admin.php (deleted)
-
includes/Classes/Controls_Manager.php (deleted)
-
includes/Classes/Entries_Table.php (deleted)
-
includes/Classes/Form_Handler.php (deleted)
-
includes/Classes/Frontend_Form.php (deleted)
-
includes/Classes/Mailer.php (deleted)
-
includes/Classes/Settings.php (deleted)
-
includes/Classes/class-admin.php (added)
-
includes/Classes/class-cart.php (added)
-
includes/Classes/class-controls-manager.php (added)
-
includes/Classes/class-form-handler.php (added)
-
includes/Classes/class-form.php (added)
-
includes/Classes/class-mailer.php (added)
-
includes/Classes/class-migration.php (added)
-
includes/Classes/class-product.php (added)
-
includes/Classes/class-quotations.php (added)
-
includes/Classes/class-request.php (added)
-
includes/Classes/class-settings.php (added)
-
includes/Classes/class-shortcode.php (added)
-
includes/Classes/class-table.php (added)
-
includes/Classes/class-utils.php (added)
-
includes/Database (deleted)
-
includes/PQFW.php (added)
-
includes/Views/layout.php (modified) (10 diffs)
-
includes/Views/pages (added)
-
includes/Views/pages/settings (added)
-
includes/Views/pages/settings/index.php (added)
-
includes/Views/partials/entries.php (modified) (2 diffs)
-
includes/Views/partials/entry-details.php (modified) (2 diffs)
-
includes/Views/partials/pqfw-cart-shortcode.php (added)
-
includes/Views/partials/quotation-detail.php (added)
-
includes/Views/partials/quotation-products-detail.php (added)
-
includes/Views/partials/settings.php (deleted)
-
product-quotation-for-woocommerce.php (modified) (3 diffs)
-
vendor (added)
-
vendor/appsero (added)
-
vendor/appsero/client (added)
-
vendor/appsero/client/.gitignore (added)
-
vendor/appsero/client/composer.json (added)
-
vendor/appsero/client/readme.md (added)
-
vendor/appsero/client/src (added)
-
vendor/appsero/client/src/Client.php (added)
-
vendor/appsero/client/src/Insights.php (added)
-
vendor/appsero/client/src/License.php (added)
-
vendor/appsero/client/src/Updater.php (added)
-
vendor/autoload.php (added)
-
vendor/composer (added)
-
vendor/composer/ClassLoader.php (added)
-
vendor/composer/InstalledVersions.php (added)
-
vendor/composer/LICENSE (added)
-
vendor/composer/autoload_classmap.php (added)
-
vendor/composer/autoload_namespaces.php (added)
-
vendor/composer/autoload_psr4.php (added)
-
vendor/composer/autoload_real.php (added)
-
vendor/composer/autoload_static.php (added)
-
vendor/composer/installed.json (added)
-
vendor/composer/installed.php (added)
-
vendor/composer/platform_check.php (added)
Legend:
- Unmodified
- Added
- Removed
-
product-quotation-for-woocommerce/trunk/README.txt
r2661996 r2709540 3 3 Tags: product, quotation, woocommerce, contact form, mail 4 4 Requires at least: 4.0 5 Tested up to: 5. 8.36 Stable tag: 1. 1.05 Tested up to: 5.6 6 Stable tag: 1.2.0 7 7 License: GPLv3 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 68 68 == Changelog == 69 69 70 = 1.2.0 - 14-04-2022 = 71 * Rewrite the whole plugin features 72 * Added new settings options. 73 * Small bug fixes 74 70 75 = 1.0.0 - 18-12-2020 = 71 76 72 77 * Initial release 73 78 74 75 == Upgrade Notice ==76 -
product-quotation-for-woocommerce/trunk/assets/css/pqfw-admin.css
r2445332 r2709540 97 97 position: relative; 98 98 display: inline-block; 99 width: 60px;100 height: 34px;99 width: 50px; 100 height: 22px; 101 101 } 102 102 … … 124 124 position: absolute; 125 125 content: ""; 126 height: 26px;127 width: 26px;126 height: 16px; 127 width: 16px; 128 128 left: 4px; 129 bottom: 4px;129 bottom: 3px; 130 130 background-color: white; 131 131 transition: 0.4s; -
product-quotation-for-woocommerce/trunk/assets/css/pqfw-frontend.css
r2445332 r2709540 6 6 * @version 1.0.0 7 7 */ 8 9 10 #pqfw-frontend-form-wrap { 11 display: none; 12 } 8 13 9 14 .use-pqfw-form-default-design ul.pqfw-frontend-form { … … 59 64 width: 16px; 60 65 height: 16px; 61 background: url('../images/ wpspin_light.gif') no-repeat;66 background: url('../images/loader.gif') no-repeat; 62 67 display: inline-block; 63 68 } -
product-quotation-for-woocommerce/trunk/assets/js/pqfw-frontend.js
r2445332 r2709540 8 8 9 9 jQuery(function ( $ ) { 10 11 var PQFW = { 12 init : function() { 13 $(document) 14 .on('click', '.pqfw-add-to-quotation-single', function (ev) { 15 ev.preventDefault(); 16 PQFW.sendData(this); 17 }); 18 }, 19 20 sendData : function(button) { 21 console.log($(button).data('id')); 22 var data = { 23 productID : $(button).data('id'), 24 action : PQFW_OBJECT.actions.addToQuotations, 25 variationID : PQFW.getVariationID(), 26 variationDetails : PQFW.getVariationDetails(), 27 quantity : PQFW.getQuantity() 28 }; 29 30 if( PQFW.variationAlert() ) { 31 PQFW.setLoading(button); 32 33 $.post( PQFW_OBJECT.ajaxurl, data, 34 function (response) { 35 PQFW.addToQuotationCart(button); 36 } 37 ); 38 } 39 }, 40 addToQuotationCart : function (button) { 41 $(button).removeClass('loading'); 42 $(button).addClass('added'); 43 PQFW.viewQuotationCart(button); 44 }, 45 viewQuotationCart : function (button) { 46 var url = PQFW_OBJECT.cartPageUrl; 47 if (url != false) { 48 $(".pqfw-view-quotation-cart").remove(); 49 $(button).after('<a class="pqfw-view-quotation-cart" href="' + url + '">' + PQFW_OBJECT.ViewCartLabel + '</a>'); 50 } 51 }, 52 setLoading : function (button) { 53 $(button).addClass('loading'); 54 }, 55 getVariationID : function () { 56 var variation = $("form.variations_form input[name='variation_id']").val(); 57 return typeof variation != "undefined" && variation != 0 ? parseInt(variation) : 0; 58 }, 59 getVariationDetails : function () { 60 var variation 61 = $("form.variations_form input[name='variation_id']").val(), 62 details = {}; 63 64 if (typeof variation != "undefined" && variation != 0) { 65 jQuery('select[name^=attribute_]').each(function (ind, obj) { 66 details[jQuery(this).attr('name')] = jQuery(this).val(); 67 }); 68 } 69 70 if ($.isEmptyObject(details)) { 71 return 0; 72 } 73 74 return details; 75 }, 76 getQuantity : function (id) { 77 var quantity = $('form.cart input[name="quantity"]').val(); 78 return typeof quantity != "undefined" ? quantity : 1; 79 }, 80 variationAlert : function () { 81 if ( jQuery('.variation_id').length > 0 && jQuery('.variation_id').val() == '' || jQuery('.variation_id').val() == 0 ) { 82 alert('Variation not selected'); 83 return false; 84 } 85 return true; 86 }, 87 } 88 89 PQFW.init(); 10 90 11 91 $( document ) … … 27 107 28 108 var t = $( this ), 29 fragments = t.data( 'fragments' ),30 109 nonce = f.find( 'input[name="pqfw_form_nonce_field"]').val(), 31 110 loader = t.next('.loading-spinner'); … … 93 172 94 173 if ( ! $.isEmptyObject( data ) ) { 95 //loading the product fragments and action. 96 data['fragments'] = fragments; 97 data['action'] = PQFW_OBJECT.actions.insert_entry; 174 data['action'] = 'pqfw_quotation_submission'; 98 175 data['nonce'] = nonce; 99 176 … … 101 178 type: 'POST', 102 179 url: PQFW_OBJECT.ajaxurl, 103 // dataType: "json",104 180 data: data, 105 181 beforeSend: function() { … … 123 199 }); 124 200 201 setTimeout(function() { 202 window.pqfwCart.initialize(); 203 }, 2000); 204 125 205 }else { 126 206 resposneStatus.removeClass('success'); … … 149 229 }) 150 230 .trigger("pqfw_init"); 151 152 231 }); -
product-quotation-for-woocommerce/trunk/autoload.php
r2445332 r2709540 1 1 <?php 2 3 2 /** 4 3 * Handling plugin spl autoloader golobally 5 * 6 * @since 1.0.0 4 * 5 * @since 1.2.0 6 * @package PQFW 7 7 */ 8 8 9 spl_autoload_register( function ( $class ) { 10 // project-specific namespace prefix 11 $prefix = 'PQFW\\'; 9 // if direct access than exit the file. 10 defined( 'ABSPATH' ) || exit; 12 11 13 // base directory for the namespace prefix 14 $base_dir = PQFW_PLUGIN_PATH . '/includes/'; 12 spl_autoload_register(function ( $class ) { 13 $prefix = 'PQFW\\'; 14 $base_dir = PQFW_PLUGIN_PATH . 'includes/'; 15 $len = strlen( $prefix ); 15 16 16 // does the class use the namespace prefix? 17 $len = strlen( $prefix ); 18 if ( strncmp( $prefix, $class, $len ) !== 0 ) { 19 // no, move to the next registered autoloader 20 return; 21 } 17 if ( strncmp( $prefix, $class, $len ) !== 0 ) { 18 return; 19 } 22 20 23 // get the relative class name 24 $relative_class = substr( $class, $len ); 21 $class = substr( $class, $len ); 22 $arr = explode( '\\', $class ); 23 $index = absint( count( $arr ) - 1 ); 24 $fileName = strtolower( $arr[ $index ] ); 25 $fileName = str_replace( '_', '-', $fileName ); 26 $fileName = 'class-' . $fileName; 27 $arr[ $index ] = $fileName; 25 28 26 // replace the namespace prefix with the base directory, replace namespace 27 // separators with directory separators in the relative class name, append 28 // with .php 29 $file = $base_dir . str_replace( '\\', '/', $relative_class) . '.php'; 29 $class = join( '\\', $arr ); 30 $file = $base_dir . str_replace( '\\', '/', $class ) . '.php'; 30 31 31 // if the file exists, require it 32 if ( file_exists( $file ) ) { 33 require $file; 34 } 35 } ); 32 if ( file_exists( $file ) ) { 33 require $file; 34 } 35 }); -
product-quotation-for-woocommerce/trunk/includes/Views/layout.php
r2445332 r2709540 5 5 * 6 6 * @since 1.0.0 7 * @package PQFW 7 8 */ 8 9 9 10 use \PQFW\Database\Utils; 10 11 11 if ( ! defined( 'ABSPATH' ) ) { 12 exit; 13 } // Exit if accessed directly 12 // if direct access than exit the file. 13 defined( 'ABSPATH' ) || exit; 14 14 15 15 /** … … 19 19 * @since 1.0.0 20 20 */ 21 if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] === 'delete') {21 if ( isset( $_REQUEST['action'] ) && 'delete' === $_REQUEST['action'] ) { 22 22 23 23 if ( ! isset( $_REQUEST['_wpnonce'] ) && ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'pqfw_admin_nonce_action' ) ) { 24 die( __( 'Unauthorized Operation', 'pqfw' ) );24 die( esc_html__( 'Unauthorized Operation', 'pqfw' ) ); 25 25 } 26 26 … … 32 32 */ 33 33 if ( ! isset( $_REQUEST['pqfw-entries'] ) && isset( $_REQUEST['post'] ) && ! empty( $_REQUEST['post'] ) ) { 34 foreach ( $_REQUEST['post'] as $ post ) {35 Utils::soft_delete( (int) $post );34 foreach ( $_REQUEST['post'] as $singlePost ) { 35 pqfw()->utils->soft_delete( (int) $singlePost ); 36 36 } 37 37 } … … 46 46 */ 47 47 if ( isset( $_REQUEST['pqfw-entry'] ) && ! empty( $_REQUEST['pqfw-entry'] ) ) { 48 Utils::soft_delete( (int) $_REQUEST['pqfw-entry'] );49 wp_safe_redirect( \PQFW\Bootstrap::get_url_with_nonce() );48 pqfw()->utils->soft_delete( (int) $_REQUEST['pqfw-entry'] ); 49 wp_safe_redirect( pqfw()->get_url_with_nonce() ); 50 50 } 51 51 … … 58 58 if ( isset( $_REQUEST['pqfw-entries'] ) && $_REQUEST['pqfw-entries'] === 'trash' && isset( $_REQUEST['post'] ) && ! empty( $_REQUEST['post'] ) ) { 59 59 foreach ( $_REQUEST['post'] as $post ) { 60 Utils::delete( (int) $post );60 pqfw()->utils->delete( (int) $post ); 61 61 } 62 62 63 wp_safe_redirect( \PQFW\Bootstrap::get_url_with_nonce( '?page=pqfw-entries-page&pqfw-entries=trash' ) );63 wp_safe_redirect( pqfw()->get_url_with_nonce( '?page=pqfw-entries-page&pqfw-entries=trash' ) ); 64 64 } 65 66 65 } 67 66 … … 75 74 76 75 if ( ! isset( $_REQUEST['_wpnonce'] ) && ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'pqfw_admin_nonce_action' ) ) { 77 die( __( 'Unauthorized Operation', 'pqfw' ) );76 die( esc_html__( 'Unauthorized Operation', 'pqfw' ) ); 78 77 } 79 78 … … 87 86 if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] === 'restore' && isset( $_REQUEST['post'] ) && ! empty( $_REQUEST['post'] ) ) { 88 87 foreach ( $_REQUEST['post'] as $post ) { 89 Utils::restore( (int) $post );88 pqfw()->utils->restore( (int) $post ); 90 89 } 91 90 92 wp_safe_redirect( \PQFW\Bootstrap::get_url_with_nonce() );91 wp_safe_redirect( pqfw()->get_url_with_nonce() ); 93 92 } 94 93 … … 100 99 */ 101 100 if ( isset( $_REQUEST['pqfw-delete-entry'] ) && ! empty( $_REQUEST['pqfw-delete-entry'] ) ) { 102 Utils::delete( (int) $_REQUEST['pqfw-delete-entry'] );103 wp_safe_redirect( \PQFW\Bootstrap::get_url_with_nonce( '?page=pqfw-entries-page&pqfw-entries=trash' ) );101 pqfw()->utils->delete( (int) $_REQUEST['pqfw-delete-entry'] ); 102 wp_safe_redirect( pqfw()->get_url_with_nonce( '?page=pqfw-entries-page&pqfw-entries=trash' ) ); 104 103 } 105 104 … … 108 107 * Get entry ID and pass it to the restore. 109 108 * 110 * after performing operation redirect to entries page.109 * After performing operation redirect to entries page. 111 110 * 112 111 * @since 1.0.0 113 112 */ 114 113 if ( isset( $_REQUEST['pqfw-restore-entry'] ) && ! empty( $_REQUEST['pqfw-restore-entry'] ) ) { 115 Utils::restore( (int) $_REQUEST['pqfw-restore-entry'] );116 wp_safe_redirect( \PQFW\Bootstrap::get_url_with_nonce() );114 pqfw()->utils->restore( (int) $_REQUEST['pqfw-restore-entry'] ); 115 wp_safe_redirect( pqfw()->get_url_with_nonce() ); 117 116 } 118 119 117 } 120 118 … … 124 122 include PQFW_PLUGIN_VIEWS . 'partials/entries.php'; 125 123 } 126 -
product-quotation-for-woocommerce/trunk/includes/Views/partials/entries.php
r2445332 r2709540 4 4 * 5 5 * @since 1.0.0 6 * @package PQFW 6 7 */ 7 8 … … 10 11 } // Exit if accessed directly 11 12 12 use \PQFW\Database\Utils; 13 use \PQFW\Classes\Entries_Table; 14 use \PQFW\Bootstrap; 15 16 $entries_list_table = new Entries_Table(); 17 18 $entries = Utils::fetch_entries( 19 $entries_list_table->get_per_page(), 20 $entries_list_table->get_offset(), 21 Utils::get_status( $_REQUEST ) 13 $entries = pqfw()->utils->fetch_entries( 14 pqfw()->table->get_per_page(), 15 pqfw()->table->get_offset(), 16 pqfw()->utils->get_status( $_REQUEST ) 22 17 ); 23 18 24 19 ?> 25 20 21 <div class="pqfw-deprecation-notice" style="background-color: azure;border: 1px solid azure; padding: 10px 20px; margin-top: 20px; max-width: 95%;"> 22 <p style="margin: 0; color: red"> 23 <?php 24 _e( '<strong>Warning:</strong> Since, This plugin introduced new way to list the Quotaions. So, these old quotations will be removed in the next version <strong>2.0.0</strong> of release. Please backup these manually.', 'pqfw' ); 25 ?> 26 </p> 27 </div> 28 26 29 <div class="pqfw-entries-wrapper wrap"> 27 <h1 class="screen-reader-text"><?php esc_html__( 'Product Quotation For WooCommerce', 'pqfw' ); ?></h1>30 <h1 class="screen-reader-text"><?php esc_html__( 'Product Quotation For WooCommerce', 'pqfw' ); ?></h1> 28 31 29 <form method="POST">30 <div class="pqfw-form-entries">32 <form method="POST"> 33 <div class="pqfw-form-entries"> 31 34 32 <?php $entries_list_table->display( 'top' ); ?>35 <?php pqfw()->table->display( 'top' ); ?> 33 36 34 <table class="wp-list-table widefat fixed striped">35 <thead>36 <tr>37 <td id="cb" class="manage-column column-cb check-column">38 <input type="checkbox">39 </td>40 <th class="col-entry-id"><?php _e( 'ID', 'pqfw' ); ?></th>41 <th><?php _e( 'Name', 'pqfw' ); ?></th>42 <th><?php _e( 'Email Address', 'pqfw' ); ?></th>43 <th><?php _e( 'Actions', 'pqfw' ); ?></th>44 </tr>45 </thead>37 <table class="wp-list-table widefat fixed striped"> 38 <thead> 39 <tr> 40 <td id="cb" class="manage-column column-cb check-column"> 41 <input type="checkbox"> 42 </td> 43 <th class="col-entry-id"><?php _e( 'ID', 'pqfw' ); ?></th> 44 <th><?php _e( 'Name', 'pqfw' ); ?></th> 45 <th><?php _e( 'Email Address', 'pqfw' ); ?></th> 46 <th><?php _e( 'Actions', 'pqfw' ); ?></th> 47 </tr> 48 </thead> 46 49 47 <tfoot>48 <tr>49 <td id="cb" class="manage-column column-cb check-column">50 <input type="checkbox">51 </td>52 <th class="col-entry-id"><?php _e( 'ID', 'pqfw' ); ?></th>53 <th><?php _e( 'Name', 'pqfw' ); ?></th>54 <th><?php _e( 'Email Address', 'pqfw' ); ?></th>55 <th><?php _e( 'Actions', 'pqfw' ); ?></th>56 </tr>57 </tfoot>50 <tfoot> 51 <tr> 52 <td id="cb" class="manage-column column-cb check-column"> 53 <input type="checkbox"> 54 </td> 55 <th class="col-entry-id"><?php _e( 'ID', 'pqfw' ); ?></th> 56 <th><?php _e( 'Name', 'pqfw' ); ?></th> 57 <th><?php _e( 'Email Address', 'pqfw' ); ?></th> 58 <th><?php _e( 'Actions', 'pqfw' ); ?></th> 59 </tr> 60 </tfoot> 58 61 59 <tbody>62 <tbody> 60 63 <?php 61 64 if ( $entries ) { 62 65 foreach ( $entries as $entry ) { 63 66 ?> 64 <tr> 65 <th scope="row" class="check-column"><input type="checkbox" name="post[]" value="<?php echo esc_attr( $entry->ID ); ?>"> 66 </th> 67 <th class="col-entry-id"> 68 <?php if ( Utils::get_status( $_REQUEST ) === 'trash' ) : ?> 69 <span>#<?php echo esc_attr( $entry->ID ); ?></span> 67 <tr> 68 <th scope="row" class="check-column"><input type="checkbox" name="post[]" value="<?php echo esc_attr( $entry->ID ); ?>"> 69 </th> 70 71 <th class="col-entry-id"> 72 <?php if ( 'trash' === pqfw()->utils->get_status( $_REQUEST ) ) : ?> 73 <span>#<?php echo esc_attr( $entry->ID ); ?></span> 70 74 <?php else : ?> 71 <a href="<?php echo Bootstrap::get_url_with_nonce( '?page=pqfw-entries-page&pqfw-entry=' . esc_attr( $entry->ID) ); ?>"72 class="">#<?php echo esc_attr( $entry->ID ); ?></a>75 <a href="<?php echo esc_url( pqfw()->get_url_with_nonce( 'edit.php?post_type=pqfw_quotations&page=pqfw-entries-page&pqfw-entry=' . esc_attr( $entry->ID ) ) ); ?>" 76 class="">#<?php echo esc_attr( $entry->ID ); ?></a> 73 77 <?php endif; ?> 74 </th>75 <td><span><?php echo esc_attr( $entry->fullname ); ?></span></td>76 <td><span><?php echo esc_attr( $entry->email ); ?></span></td>77 <th class="col-entry-details">78 <?php if ( Utils::get_status( $_REQUEST ) === 'trash' ) : ?>79 <a href="<?php echo Bootstrap::get_url_with_nonce( '?page=pqfw-entries-page&pqfw-entries=trash&pqfw-restore-entry=' . esc_attr( $entry->ID) ); ?>">80 <?php_e( 'Restore', 'pqfw' ); ?>81 </a>82 <span style="color: rgb(221, 221, 221);">|</span>83 <a href="<?php echo Bootstrap::get_url_with_nonce( '?page=pqfw-entries-page&pqfw-entries=trash&pqfw-delete-entry=' . esc_attr( $entry->ID) ); ?>">84 <?php_e( 'Delete Permanently', 'pqfw' ); ?>85 </a>78 </th> 79 <td><span><?php echo esc_attr( $entry->fullname ); ?></span></td> 80 <td><span><?php echo esc_attr( $entry->email ); ?></span></td> 81 <th class="col-entry-details"> 82 <?php if ( pqfw()->utils->get_status( $_REQUEST ) === 'trash' ) : ?> 83 <a href="<?php echo esc_url( pqfw()->get_url_with_nonce( 'edit.php?post_type=pqfw_quotations&page=pqfw-entries-page&pqfw-entries=trash&pqfw-restore-entry=' . esc_attr( $entry->ID ) ) ); ?>"> 84 <?php esc_html_e( 'Restore', 'pqfw' ); ?> 85 </a> 86 <span style="color: rgb(221, 221, 221);">|</span> 87 <a href="<?php echo esc_url( pqfw()->get_url_with_nonce( 'edit.php?post_type=pqfw_quotations&page=pqfw-entries-page&pqfw-entries=trash&pqfw-delete-entry=' . esc_attr( $entry->ID ) ) ); ?>"> 88 <?php esc_html_e( 'Delete Permanently', 'pqfw' ); ?> 89 </a> 86 90 <?php else : ?> 87 <a href="<?php echo Bootstrap::get_url_with_nonce( '?page=pqfw-entries-page&pqfw-entry=' . esc_attr( $entry->ID) ); ?>"88 class=""><?php_e( 'Details', 'pqfw' ); ?></a>91 <a href="<?php echo esc_url( pqfw()->get_url_with_nonce( 'edit.php?post_type=pqfw_quotations&page=pqfw-entries-page&pqfw-entry=' . esc_attr( $entry->ID ) ) ); ?>" 92 class=""><?php esc_html_e( 'Details', 'pqfw' ); ?></a> 89 93 <?php endif; ?> 90 </th>91 </tr>94 </th> 95 </tr> 92 96 <?php 93 97 } 94 98 } else { 95 99 ?> 96 <tr>97 <th></th>98 <td>99 <span><?php_e( 'No entries found.', 'pqfw' ); ?></span>100 </td>101 </tr>100 <tr> 101 <th></th> 102 <td> 103 <span><?php esc_html_e( 'No entries found.', 'pqfw' ); ?></span> 104 </td> 105 </tr> 102 106 <?php 103 107 } 104 108 ?> 105 </tbody> 106 107 </table> 108 109 <?php //$entries_list_table->display( 'bottom' ); ?> 110 111 </div> 112 </form> 109 </tbody> 110 </table> 111 </div> 112 </form> 113 113 </div> -
product-quotation-for-woocommerce/trunk/includes/Views/partials/entry-details.php
r2445332 r2709540 10 10 } // Exit if accessed directly 11 11 12 use \PQFW\Database\Utils;13 use \PQFW\Bootstrap;14 12 15 $entry = Utils::fetch_entry( absint( $_REQUEST['pqfw-entry'] ) );13 $entry = pqfw()->utils->fetch_entry( absint( $_REQUEST['pqfw-entry'] ) ); 16 14 17 15 ?> … … 33 31 34 32 <h1 class="wp-heading-inline"><?php _e( 'Entry Details', 'pqfw' ); ?></h1> 35 <a href="<?php echo Bootstrap::get_url_with_nonce(); ?>"33 <a href="<?php echo esc_url( pqfw()->get_url_with_nonce( 'edit.php?post_type=pqfw_quotations&page=pqfw-entries-page' ) ); ?>" 36 34 class="page-title-action"><?php _e( 'Back to Entries', 'pqfw' ); ?></a> 37 35 <form method="POST"> -
product-quotation-for-woocommerce/trunk/product-quotation-for-woocommerce.php
r2445332 r2709540 4 4 * Plugin URI: https://github.com/mahafuz/product-quotation-for-woocommerce 5 5 * Description: Removes the 'Add to cart' button from WooCommerce and adds a simple 'Request for quotation' form on all product pages instead of it. 6 * Version: 1. 06 * Version: 1.2.0 7 7 * Author: Mahafuz <m.mahfuz.me@gmail.com> 8 8 * Author URI: https://github.com/mahafuz/ 9 9 * Text Domain: pqfw 10 10 * Domain Path: /languages 11 * 12 * @package PQFW 11 13 */ 12 14 13 if ( ! defined( 'ABSPATH' ) ) { 14 exit; 15 } // Exit if accessed directly 15 // if direct access than exit the file. 16 defined( 'ABSPATH' ) || exit; 16 17 17 18 /** 18 19 * Defining plugin constans 19 20 * 20 * @since 1. 0.021 * @since 1.2.0 21 22 */ 22 23 define( 'PQFW_PLUGIN_FILE', __FILE__ ); … … 25 26 define( 'PQFW_PLUGIN_VIEWS', trailingslashit( plugin_dir_path( __FILE__ ) . 'includes/Views' ) ); 26 27 define( 'PQFW_PLUGIN_URL', trailingslashit( plugins_url( '/', __FILE__ ) ) ); 27 define( 'PQFW_PLUGIN_VERSION', '1.0.0' ); 28 29 /** 30 * Including spl autoloader globally. 31 * 32 * @since 1.0.0 33 */ 34 require PQFW_PLUGIN_PATH . 'autoload.php'; 35 36 /** 37 * Run the plugin after all other plugins. 38 * 39 * @since 1.0.0 40 */ 41 add_action( 'plugins_loaded', function () { 42 \PQFW\Bootstrap::instance(); 43 } ); 28 define( 'PQFW_PLUGIN_VERSION', '1.2.0' ); 44 29 45 30 /** … … 48 33 * @since 1.0.0 49 34 */ 50 register_activation_hook( __FILE__, function () { 51 $migration = new \PQFW\Database\Migration(); 52 $migration->run(); 53 } ); 35 register_activation_hook(__FILE__, function () { 36 pqfw()->migration->run(); 37 }); 38 39 require PQFW_PLUGIN_PATH . 'includes/PQFW.php'; 40 41 add_action( 'plugins_loaded', function() { 42 pqfw(); 43 }); 44 45 require __DIR__ . '/vendor/autoload.php'; 46 47 /** 48 * Initialize the plugin tracker 49 * 50 * @since 1.2.0 51 * @return void 52 */ 53 function appsero_init_tracker_product_quotation_for_woocommerce() { 54 if ( ! class_exists( 'Appsero\Client' ) ) { 55 require_once __DIR__ . '/appsero/src/Client.php'; 56 } 57 58 $client = new Appsero\Client( 'e806fe7d-f314-425d-8be4-9f62fdaf71cf', 'Product Quotation – Product Quotation For WooCommerce', __FILE__ ); 59 60 // Active insights. 61 $client->insights()->init(); 62 } 63 appsero_init_tracker_product_quotation_for_woocommerce();
Note: See TracChangeset
for help on using the changeset viewer.