Title: Mediatricks's Replies | WordPress.org

---

# Mediatricks

  [  ](https://wordpress.org/support/users/mediatricks/)

 *   [Profile](https://wordpress.org/support/users/mediatricks/)
 *   [Topics Started](https://wordpress.org/support/users/mediatricks/topics/)
 *   [Replies Created](https://wordpress.org/support/users/mediatricks/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/mediatricks/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/mediatricks/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/mediatricks/engagements/)
 *   [Favorites](https://wordpress.org/support/users/mediatricks/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 25 total)

1 [2](https://wordpress.org/support/users/mediatricks/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/mediatricks/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Elementor Website Builder - more than just a page builder] Elementor and ACF Not Allowing Page to Save; _elementor_page_settings](https://wordpress.org/support/topic/elementor-and-acf-now-allowing-page-to-save-_elementor_page_settings/)
 *  [Mediatricks](https://wordpress.org/support/users/mediatricks/)
 * (@mediatricks)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/elementor-and-acf-now-allowing-page-to-save-_elementor_page_settings/#post-18351300)
 * Same issue experienced by EDITOR level users on my site. (No issue for Admins)
   
   On updating a page with ACF Meta field boxes:“Updating failed. Sorry, you are
   not allowed to edit the _elementor_page_settings custom field.”
 * Using ACF regular (6.3.12) and Elementor (3.27.6) Elementor Pro (3.27.5)
   Discovered
   that under ELEMENTOR->ROLE MANAGER sub menu, if I enable the “Access to edit 
   content only” check box for the EDITOR role, it fixes the problem.
 * Previously I had “No access to editor” set for EDITORs as I didn’t really want
   them accessing the Elementor pages at all. But this seems to unlock the ability
   for ACF to give EDITORS permission to update the custom fields created by ACF.
 * It’s not a perfect fix and highlights a possible root of the problem – Why are
   the ACF fields being treated as Elementor Content (_elementor_page_settings) 
   by WP when they don’t need to be. They should be recognized as meta data not 
   Elementor data and user permissions should be applied accordingly.
    -  This reply was modified 1 year, 6 months ago by [Mediatricks](https://wordpress.org/support/users/mediatricks/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Sprout Invoices - Client Invoicing & Estimates] ESTIMATE APPROVE/DECLINE buttons not working](https://wordpress.org/support/topic/estimate-approve-decline-buttons-not-working/)
 *  Thread Starter [Mediatricks](https://wordpress.org/support/users/mediatricks/)
 * (@mediatricks)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/estimate-approve-decline-buttons-not-working/#post-18286754)
 * Tested and confirmed fixed. Thank you. 
   I would still like to request that the
   error messages on Ajax Fail are made more Customer friendly.“Not going to fall
   for it!” is not a message our clients should see in case of error.🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Sprout Invoices - Client Invoicing & Estimates] ESTIMATE APPROVE/DECLINE buttons not working](https://wordpress.org/support/topic/estimate-approve-decline-buttons-not-working/)
 *  Thread Starter [Mediatricks](https://wordpress.org/support/users/mediatricks/)
 * (@mediatricks)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/estimate-approve-decline-buttons-not-working/#post-18284359)
 * I think another issue might be connected:
   Too often, when a user is trying to
   register a payment and chooses to alter the PAYMENT AMOUNT from the top of their
   invoice they get an error “Not going to fall for it!”This message alone drives
   my client crazy so I have manually updated in in _Controller.php to “Something
   went wrong!” but is seems to be linked to a similar Status / Nonce check issue.
 * if ( ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST[‘change_status_nonce’])),
   self::NONCE ) ) {
   self::ajax_fail( ‘Something went wrong!’ ); }BOTH ISSUES SEEM
   TO BE CREATED FROM WITHIN THIS FUNCTION:
 *     ```wp-block-code
       public static function maybe_change_status() {
           if ( ! current_user_can( 'edit_posts' ) ) {
               self::ajax_fail( 'Unauthorized User Action' );
           }
   
           if ( ! isset( $_REQUEST['change_status_nonce'] ) ) {
               self::ajax_fail( 'Forget something?' ); }
   
           if ( ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['change_status_nonce'] ) ) , self::NONCE ) ) {
               self::ajax_fail( 'Something went wrong!' ); }
   
           if ( ! isset( $_REQUEST['id'] ) ) {
               self::ajax_fail( 'Forget something?' ); }
   
           if ( ! isset( $_REQUEST['status'] ) ) {
               self::ajax_fail( 'Forget something?' ); }
   
           $view = '';
           $doc_id = sanitize_text_field( wp_unslash( $_REQUEST['id'] ) );
           $new_status = sanitize_text_field( wp_unslash( $_REQUEST['status'] ) );
           switch ( get_post_type( $doc_id ) ) {
               case SI_Invoice::POST_TYPE:
                   $doc = SI_Invoice::get_instance( $doc_id );
                   $doc->set_status( $new_status );
                   $view = self::load_view_to_string( 'admin/sections/invoice-status-change-drop', array(
                           'id' => $doc_id,
                           'status' => $doc->get_status(),
                   ), false );
                   break;
               case SI_Estimate::POST_TYPE:
                   switch ( $new_status ) {
                       case 'accept':
                           $new_status = SI_Estimate::STATUS_APPROVED;
                           break;
                       case 'decline':
                           $new_status = SI_Estimate::STATUS_DECLINED;
                           break;
   
                       default:
                           break;
                   }
                   $doc = SI_Estimate::get_instance( $doc_id );
                   $doc->set_status( $new_status );
                   $view = self::load_view_to_string( 'admin/sections/estimate-status-change-drop', array(
                           'id' => $doc_id,
                           'status' => $doc->get_status(),
                   ), false );
                   break;
   
               default:
                   self::ajax_fail( 'Not an estimate or invoice.' );
                   return;
                   break;
           }
   
           // action
           do_action( 'doc_status_changed', $doc, $_REQUEST );
   
           header( 'Content-type: application/json' );
           if ( self::DEBUG ) { header( 'Access-Control-Allow-Origin: *' ); }
           echo wp_json_encode( array( 'new_button' => $view ) );
           exit();
   
       }
       ```
   
    -  This reply was modified 1 year, 7 months ago by [Mediatricks](https://wordpress.org/support/users/mediatricks/).
      Reason: Update
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Sprout Invoices - Client Invoicing & Estimates] ESTIMATE APPROVE/DECLINE buttons not working](https://wordpress.org/support/topic/estimate-approve-decline-buttons-not-working/)
 *  Thread Starter [Mediatricks](https://wordpress.org/support/users/mediatricks/)
 * (@mediatricks)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/estimate-approve-decline-buttons-not-working/#post-18284211)
 * Thank you. I have tested on my sandbox with a clean install of the latest version
   of the pro plugin, and NO other plugins active (using native 2024 WP theme)  
   and the error persists. 
 * Waiting on a fix.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[The Events Calendar] Cannot add Price to Events](https://wordpress.org/support/topic/cannot-add-price-to-events/)
 *  [Mediatricks](https://wordpress.org/support/users/mediatricks/)
 * (@mediatricks)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cannot-add-price-to-events/#post-14604269)
 * Thanks so much for confirming this. It was driving me mad. Will be patient for
   a fix.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[The Events Calendar] Cannot add Price to Events](https://wordpress.org/support/topic/cannot-add-price-to-events/)
 *  [Mediatricks](https://wordpress.org/support/users/mediatricks/)
 * (@mediatricks)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/cannot-add-price-to-events/#post-14602588)
 * I have the same problem since 5.7.1 update. Price does not get saved (or displayed)
   if the GUTENBERG BLOCK EDITOR is enabled for editing. If I turn off the Block
   Editor then I can set, and save price.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[StageShow] Custom Gateway Ticket Emails not sending since 8.0.3 update](https://wordpress.org/support/topic/custom-gateway-ticket-emails-not-sending-since-8-0-3-update/)
 *  Thread Starter [Mediatricks](https://wordpress.org/support/users/mediatricks/)
 * (@mediatricks)
 * [8 years ago](https://wordpress.org/support/topic/custom-gateway-ticket-emails-not-sending-since-8-0-3-update/#post-10676916)
 * So you want to add a transaction ID even before the transaction is marked as 
   COMPLETE?
 * This is doable? You can update the UpdateSaleReserved function from Step 2 above
   as follows:
 * ————
 * // Update Set a Booking to RESERVED
    function UpdateSaleReserved($saleId) {
 * $txnid = substr(md5(microtime()),rand(0,26),16);
    date_default_timezone_set(‘
   Asia/Kuwait’); $date = new DateTime(‘NOW’); $date->add(new DateInterval(‘P90D’));
   $newcheckout=$date->format(‘Y-m-d H:i:s’);
 * $sql = ‘UPDATE ‘.$this->DBTables->Sales;
    $sql .= ‘ SET saleCheckoutTime=”‘.$
   newcheckout.’”, saleTxnId=”‘.$txnid.’”, saleStatus=”Reserved”‘; $sql .= ‘ WHERE
   saleID=”‘.$saleid.’”‘;
 * $this->query($sql);
 * // Get the SaleId and return it ….
    $sql = ‘SELECT saleID FROM ‘.$this->DBTables-
   >Sales; $sql .= ‘ WHERE saleID=”‘.$saleid.’”‘;
 * $saleEntry = $this->get_results($sql);
    if (count($saleEntry) == 0) return 0;
 * return $saleEntry[0]->saleId;
    }
 * ———–
 * This should add a transaction ID into the Sales Table as a booking is put ON 
   HOLD.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[StageShow] Custom Gateway Ticket Emails not sending since 8.0.3 update](https://wordpress.org/support/topic/custom-gateway-ticket-emails-not-sending-since-8-0-3-update/)
 *  Thread Starter [Mediatricks](https://wordpress.org/support/users/mediatricks/)
 * (@mediatricks)
 * [8 years ago](https://wordpress.org/support/topic/custom-gateway-ticket-emails-not-sending-since-8-0-3-update/#post-10658331)
 * Hi Chris,
 * In the Sales Table I have added the option to put the reservation on hold for
   those situations when a customer starts a booking but then has a problem, or 
   asks to add seats before completing payment, or wants to pay offline/cash.
 * I have added code hack so if a Reserved Booking is manually Confirmed in the 
   back end, the DB is updated with a Sale Reference and the Paid Amount.
 * 1.
    In include/stageshow_sales_table.php
 * Look for
    const BULKACTION_COMPLETED = ‘completed’;
 * And add underneath:
 * —————
    const BULKACTION_RESERVED = ‘reserved’; ————— 2. In include/stageshowlib_sales_dbase_api.
   php
 * Add these two functions above the function GetSaleFromTxnID()
 * —————
    //Update PAID on SET COMPLETE from Admin function UpdateSalePaid($saleid){
 *  // Get the SaleId and return it ….
    $sql = ‘SELECT saleID, SUM(ticketPaid) as
   invTotal FROM ‘.$this->DBTables->Orders; $sql .= ‘ WHERE saleID=”‘.$saleid.'”‘;
 *  $Totals = $this->get_results($sql);
 *  $Paid= $Totals[0]->invTotal;
    $txnid = substr(md5(microtime()),rand(0,26),16);
 *  $sql = ‘UPDATE ‘.$this->DBTables->Sales;
    $sql .= ‘ SET salePaid=”‘.$Paid.'”,
   saleTxnId=”‘.$txnid.'”, salePPExpToken=””‘; $sql .= ‘ WHERE saleID=”‘.$saleid.'”‘;
 *  $this->query($sql);
 *  // Get the SaleId and return it ….
    $sql = ‘SELECT saleID FROM ‘.$this->DBTables-
   >Sales; $sql .= ‘ WHERE saleTxnId=”‘.$txnid.'”‘;
 *  $saleEntry = $this->get_results($sql);
    if (count($saleEntry) == 0) return 0;
 *  return $saleEntry[0]->saleId;
    }
 *  // Update Set a Booking to RESERVED
    function UpdateSaleReserved($saleId) {
 * date_default_timezone_set(‘Asia/Kuwait’);
    $date = new DateTime(‘NOW’); $date-
   >add(new DateInterval(‘P90D’)); $newcheckout=$date->format(‘Y-m-d H:i:s’);
 *  $sql = ‘UPDATE ‘.$this->DBTables->Sales;
    $sql .= ‘ SET saleCheckoutTime=”‘.
   $newcheckout.'”, saleStatus=”Reserved”‘; $sql .= ‘ WHERE saleID=”‘.$saleid.'”‘;
 *  $this->query($sql);
 *  // Get the SaleId and return it ….
    $sql = ‘SELECT saleID FROM ‘.$this->DBTables-
   >Sales; $sql .= ‘ WHERE saleID=”‘.$saleid.'”‘;
 *  $saleEntry = $this->get_results($sql);
    if (count($saleEntry) == 0) return 0;
 *  return $saleEntry[0]->saleId;
    } —————
 * 3. In stageshowplus_sales_table.php
 * Look at about line 39 – 43 for the bulkAction for Set Complete and add this modified
   copy AFTER it (before the closing } of the function.
    ————— if (!$editMode) {
   $this->bulkActions = array_merge($this->bulkActions, array( self::BULKACTION_RESERVED
   => __(‘Hold Booking’, $this->myDomain), )); } —————
 * 4. In stageshowplus_manage_sales.php
 * Look around Line 142 for Bulk Action for COMPLETED and add the following after
   the break; (Line 147?)
    —————
 * case StageShowWPOrgSalesAdminListClass::BULKACTION_RESERVED:
    if ($actionCount
   > 0) $actionMsg = $actionCount . ‘ ‘ . _n(“Sale has been put on hold”, “Sales
   have been put on hold”, $actionCount, $this->myDomain); else $actionMsg = __(“
   Nothing to Update”, $this->myDomain); break;
 * —————
 * 5. In stageshow_manage_sales.php
 * Look for the DoBulkAction function at the bottom of the file and replace it with
   this:
 * —————
 *  function DoBulkAction($bulkAction, $recordId)
    { switch ($bulkAction) { case
   StageShowWPOrgSalesAdminListClass::BULKACTION_COMPLETED: $saleResults = $this-
   >myDBaseObj->GetSale($recordId); $saleEntry = $saleResults[0];
 *  // Check record can be changed to COMPLETED
    $prevSaleStatus = $saleEntry->saleStatus;
 *  // Get the sale entry
    if (!$this->CanChangeState($prevSaleStatus, PAYMENT_API_SALESTATUS_COMPLETED))
   return false;
 *  //HACK To Update Resered and Transaction Data
    $this->myDBaseObj->UpdateSalePaid(
   $recordId); $this->myDBaseObj->UpdateSaleIDStatus($recordId, PAYMENT_API_SALESTATUS_COMPLETED);
 *  if ($prevSaleStatus == PAYMENT_API_SALESTATUS_RESERVED || $prevSaleStatus ==
   PAYMENT_API_SALESTATUS_CHECKOUT)
    { // Previously Unverified Sale is confirmed–
   Send EMail to Purchaser $this->myDBaseObj->EMailSale($saleEntry->saleID); } return
   true;
 *  case StageShowWPOrgSalesAdminListClass::BULKACTION_RESERVED:
    $saleResults =
   $this->myDBaseObj->GetSale($recordId); $saleEntry = $saleResults[0];
 *  // Check record can be changed to COMPLETED
    $prevSaleStatus = $saleEntry->saleStatus;
 *  // Get the sale entry
    //if (!$this->CanChangeState($prevSaleStatus, PAYMENT_API_SALESTATUS_COMPLETED))//
   return false;
 *  // //HACK Change saleStatus to RESERVED
 *  $this->myDBaseObj->UpdateSaleIDStatus($recordId, PAYMENT_API_SALESTATUS_RESERVED);
 *  if ($prevSaleStatus == PAYMENT_API_SALESTATUS_UNVERIFIED || $prevSaleStatus 
   == PAYMENT_API_SALESTATUS_CHECKOUT)
    {
 *  // Previously Unverified OR CHECKOUT Sale is confirmed – Send EMail to Purchaser
   
   $this->myDBaseObj->UpdateSaleReserved($recordId); } return true; }
 *  return parent::DoBulkAction($bulkAction, $recordId);
    }
 * —————
 * (That will leave two } } before the closing php tag. )
 * That should do it (unless I missed a file) and you will be able to switch records
   between COMPLETED and ON HOLD (Reserved) in the back end sales table.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[StageShow] Custom Gateway Ticket Emails not sending since 8.0.3 update](https://wordpress.org/support/topic/custom-gateway-ticket-emails-not-sending-since-8-0-3-update/)
 *  Thread Starter [Mediatricks](https://wordpress.org/support/users/mediatricks/)
 * (@mediatricks)
 * [8 years ago](https://wordpress.org/support/topic/custom-gateway-ticket-emails-not-sending-since-8-0-3-update/#post-10657326)
 * Aggghgh! I am an idiot! The include file was calling /stageshowgold/ folder and
   the new plugin is just /stageshow/ .
 * Sorry to bother you. But please consider adding these two features:
 * 1. ID column in the Sales Table
    2. The ability to change a sale from Checkout
   to Reserved. It is very useful for Backoffice management or putting seats on 
   hold for customers who will pay offline. I have added it as a BulkAction in the
   Sales Table.
 * 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Photo Gallery by 10Web - Mobile-Friendly Image Gallery] Long descriptions breaking badly](https://wordpress.org/support/topic/long-descriptions-breaking-badly/)
 *  [Mediatricks](https://wordpress.org/support/users/mediatricks/)
 * (@mediatricks)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/long-descriptions-breaking-badly/#post-10349888)
 * Having the same problem. [http://doublea.studio](http://doublea.studio). Descriptions
   do not break at words/spaces which is very annoying.
    -  This reply was modified 8 years, 3 months ago by [Mediatricks](https://wordpress.org/support/users/mediatricks/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[StageShow] Pending sales showing as sales](https://wordpress.org/support/topic/pending-sales-showing-as-sales/)
 *  [Mediatricks](https://wordpress.org/support/users/mediatricks/)
 * (@mediatricks)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/pending-sales-showing-as-sales/#post-10154279)
 * I agree. Regularly curse that my quick tally of sales income was inaccurate as
   I hadn’t deleted pending sales.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Easy Invitation Codes] [Plugin: BAW Easy Invitation Codes] Using with WP-MS](https://wordpress.org/support/topic/plugin-baw-easy-invitation-codes-using-with-wp-ms/)
 *  [Mediatricks](https://wordpress.org/support/users/mediatricks/)
 * (@mediatricks)
 * [14 years ago](https://wordpress.org/support/topic/plugin-baw-easy-invitation-codes-using-with-wp-ms/#post-2923946)
 * Are you using Buddypress? If so, check out this variation?
 * [http://mediatricks.com/2012/09/buddypress-version-of-baw-easy-invitation-codes-plugin/](http://mediatricks.com/2012/09/buddypress-version-of-baw-easy-invitation-codes-plugin/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Easy Invitation Codes] [Plugin: BAW Easy Invitation Codes] Buddypress Support](https://wordpress.org/support/topic/plugin-baw-easy-invitation-codes-buddypress-support/)
 *  [Mediatricks](https://wordpress.org/support/users/mediatricks/)
 * (@mediatricks)
 * [14 years ago](https://wordpress.org/support/topic/plugin-baw-easy-invitation-codes-buddypress-support/#post-2819237)
 * I loved Julio’s original plugin but needed it to work on BP too so made a BP 
   specific version you can get here: [http://mediatricks.com/2012/09/buddypress-version-of-baw-easy-invitation-codes-plugin/](http://mediatricks.com/2012/09/buddypress-version-of-baw-easy-invitation-codes-plugin/)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Media Uploader WP 2.5 – Caption and Description](https://wordpress.org/support/topic/media-uploader-wp-25-caption-and-description/)
 *  [Mediatricks](https://wordpress.org/support/users/mediatricks/)
 * (@mediatricks)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/media-uploader-wp-25-caption-and-description/#post-750155)
 * You can use the caption and description information neatly in plugins like Viva
   Zoom [http://www.mediatricks.biz/zoom](http://www.mediatricks.biz/zoom) that 
   uses HS to pop out your image and show the extra info.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Renaming Uncategorized creates duplicate Drafts/Posts](https://wordpress.org/support/topic/renaming-uncategorized-creates-duplicate-draftsposts/)
 *  Thread Starter [Mediatricks](https://wordpress.org/support/users/mediatricks/)
 * (@mediatricks)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/renaming-uncategorized-creates-duplicate-draftsposts/#post-765513)
 * I just did a complete fresh install with WP 2.5.1 (as my previous sites had just
   upgraded from 2.5) and this problem appears straight away – without renaming 
   the Uncategorized category.
 * I think this is a bugin WP 2.5.1
 * Tim

Viewing 15 replies - 1 through 15 (of 25 total)

1 [2](https://wordpress.org/support/users/mediatricks/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/mediatricks/replies/page/2/?output_format=md)