Title: webvd's Replies | WordPress.org

---

# webvd

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

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

 Search replies:

## Forum Replies Created

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

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[All in One Time Clock Lite - Tracking Employee Time Has Never Been Easier] Translation not working (Loco Translate)](https://wordpress.org/support/topic/translation-not-working-loco-translate/)
 *  Thread Starter [webvd](https://wordpress.org/support/users/webvd/)
 * (@webvd)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/translation-not-working-loco-translate/#post-17378658)
 * Hi Nickolas, thanks for the reply. Exactly!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Send PDF for Contact Form 7] Error in the footer of my website](https://wordpress.org/support/topic/error-in-the-footer-of-my-website/)
 *  [webvd](https://wordpress.org/support/users/webvd/)
 * (@webvd)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/error-in-the-footer-of-my-website/#post-17220814)
 * The new update is out which solves this issue!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PPWP - Password Protect Pages] Translation error](https://wordpress.org/support/topic/translation-error-34/)
 *  Thread Starter [webvd](https://wordpress.org/support/users/webvd/)
 * (@webvd)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/translation-error-34/#post-17218699)
 * It solved my problem to edit core files but I dont think it is the right solution
   cause when the plugin gets updated I need to make the changes again.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PPWP - Password Protect Pages] Translation error](https://wordpress.org/support/topic/translation-error-34/)
 *  Thread Starter [webvd](https://wordpress.org/support/users/webvd/)
 * (@webvd)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/translation-error-34/#post-17218694)
 * And it is not in there, it is in: **password-protect-page/includes/views/entire-
   site/view-ppw-form-password.php**
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PPWP - Password Protect Pages] Translation error](https://wordpress.org/support/topic/translation-error-34/)
 *  Thread Starter [webvd](https://wordpress.org/support/users/webvd/)
 * (@webvd)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/translation-error-34/#post-17218676)
 * So I have to edit a plugin core file?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PPWP - Password Protect Pages] Translation error](https://wordpress.org/support/topic/translation-error-34/)
 *  Thread Starter [webvd](https://wordpress.org/support/users/webvd/)
 * (@webvd)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/translation-error-34/#post-17216382)
 * Hi, thank you. This is what I have don allready, I also find this article on 
   your website, but it is not working. The string is showing up but the translation
   is not working.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PPWP - Password Protect Pages] Translation not working](https://wordpress.org/support/topic/translation-not-working-129/)
 *  Thread Starter [webvd](https://wordpress.org/support/users/webvd/)
 * (@webvd)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/translation-not-working-129/#post-16610309)
 * Allright thank you, it is inside the: password-protect-page\includes\views\entire-
   site\view-ppw-form-password.php
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PPWP - Password Protect Pages] Translation not working](https://wordpress.org/support/topic/translation-not-working-129/)
 *  Thread Starter [webvd](https://wordpress.org/support/users/webvd/)
 * (@webvd)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/translation-not-working-129/#post-16598674)
 * Thank you for the reply. I’m using [https://nl.wordpress.org/plugins/loco-translate/](https://nl.wordpress.org/plugins/loco-translate/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Co-Authors, Multiple Authors and Guest Authors in an Author Box with PublishPress Authors] Edit post link not showing to all authors](https://wordpress.org/support/topic/edit-post-link-not-showing-to-all-authors/)
 *  Thread Starter [webvd](https://wordpress.org/support/users/webvd/)
 * (@webvd)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/edit-post-link-not-showing-to-all-authors/#post-16598036)
 * Thank you, that is working.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[XO Event Calendar] Template for archive](https://wordpress.org/support/topic/template-for-archive/)
 *  Thread Starter [webvd](https://wordpress.org/support/users/webvd/)
 * (@webvd)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/template-for-archive/#post-16593066)
 * Thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[XO Event Calendar] Template for archive](https://wordpress.org/support/topic/template-for-archive/)
 *  Thread Starter [webvd](https://wordpress.org/support/users/webvd/)
 * (@webvd)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/template-for-archive/#post-16592124)
 * Thank you, and for the [https://mysiteurl.nl/xo_event_cat](https://mysiteurl.nl/xo_event_cat)?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[XO Event Calendar] Enable Comments](https://wordpress.org/support/topic/enable-comments-12/)
 *  Thread Starter [webvd](https://wordpress.org/support/users/webvd/)
 * (@webvd)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/enable-comments-12/#post-16589554)
 * Thank you! I have some other question. Do i need to start a new topic?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets] Strtotime outputs 1970-01-01 00:00:00 instead of correct date](https://wordpress.org/support/topic/strtotime-outputs-1970-01-01-000000-instead-of-correct-date/)
 *  Thread Starter [webvd](https://wordpress.org/support/users/webvd/)
 * (@webvd)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/strtotime-outputs-1970-01-01-000000-instead-of-correct-date/#post-13518288)
 * Solved my own question, had to replace the / string in strtotime…
 * **Use:**
 *     ```
       [date( "Y-m-d H:i:s", strtotime( str_replace("/",".",{pick_up_time[1]}) ) )]
       [date( "Y-m-d", strtotime( str_replace("/",".",{pick_up_time[1]}) ) )]
       [date( "H:i:s", strtotime( str_replace("/",".",{pick_up_time[1]}) ) )]
       ```
   
    -  This reply was modified 5 years, 7 months ago by [webvd](https://wordpress.org/support/users/webvd/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Woo Credits] Error with credit balance under 1 credit](https://wordpress.org/support/topic/error-with-credit-balance-under-1-credit/)
 *  Thread Starter [webvd](https://wordpress.org/support/users/webvd/)
 * (@webvd)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/error-with-credit-balance-under-1-credit/#post-13410755)
 * This is stupid:
 *     ```
                       $order = wc_get_order($order_id);
                       $user_id = ( WC()->version < '2.7.0' ) ? $order->user_id : $order->get_user_id();
                       $items = $order->get_items();
   
                       $total_credits_amount = 0;
   
                       foreach ($items as $item) {
                           $product = $order->get_product_from_item($item);
                           $prod_id = ( WC()->version < '2.7.0' ) ? $product->id : $product->get_id();
                           $credits_amount = get_post_meta($prod_id, '_credits_amount', true);
                           if ($credits_amount) {
                               $credits_amount = $credits_amount * $item['qty'];
                               $total_credits_amount += $credits_amount;
                           } else {
                               wc_add_notice(__('<strong>Payment error:</strong>', 'woo-credits') . ' You can not purchase product without credits set. Please choose another payment method.', 'error');
                               return;
                           }
                       }
   
                       $download_credits = floatval(get_user_meta($user_id, "_download_credits", true));
                       $cart_total = floatval(WC()->cart->total);
   
                       if ($total_credits_amount > $download_credits) {
                           wc_add_notice(__('<strong>Payment error:</strong>', 'woo-credits') . ' Insufficient Credits. Please purchase more credits or use a different payment method.', 'error');
                           return;
                       }
   
                       $new_user_download_credits = $download_credits - $total_credits_amount;
                       update_user_meta($user_id, '_download_credits', $new_user_download_credits);
   
                       if (get_user_meta($user_id, '_download_credits', true) != $new_user_download_credits) {
                           wc_add_notice(__('<strong>System error:</strong>', 'woo-credits') . ' There was an error procesing the payment. Please try another payment method.', 'error');
                           return;
   
                       }
   
                       $order->update_status('completed', __('Payment completed use Credits price', 'woo-credits'));
       ```
   
 * Why would you add the system error notice for processing the payment after the
   credit balance of the user is reduced and succesfull? And then run the status
   update to complete the order? Your forcing the error.
 * Above you check for the user to have engough balance, and if they don’t have 
   they are not able to process the order. Or when they try to buy credits with 
   credits.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Woo Credits] Credits redeemable outside checkout? Ex. for access to a particular part of site](https://wordpress.org/support/topic/credits-redeemable-outside-checkout-ex-for-access-to-a-particular-part-of-site/)
 *  [webvd](https://wordpress.org/support/users/webvd/)
 * (@webvd)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/credits-redeemable-outside-checkout-ex-for-access-to-a-particular-part-of-site/#post-13410708)
 * Let me help here since I took this plugin apart the last week.
    Credits for each
   user are stored in the database based on the user ID.
 * So, if you want to decrease there credits amount for user after sumbitting a 
   form, you can decrease the amount by getting there id and update the user meta.
   You have to get there old balance to reduce there balance.
 * $old_download_credits_amount = get_user_meta( $user_id, ‘_download_credits’, 
   true);
    update_user_meta( $user_id, ‘_download_credits’, $old_download_credits_amount-
   $amounttoreduce);

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

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