Title: King Pangilinan's Replies | WordPress.org

---

# King Pangilinan

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

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

 Search replies:

## Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[RabbitLoader Cache: Optimize your Website for Speed] Broken Javascript (on page load)](https://wordpress.org/support/topic/broken-javascript-on-page-load/)
 *  Thread Starter [King Pangilinan](https://wordpress.org/support/users/kingpg/)
 * (@kingpg)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/broken-javascript-on-page-load/#post-15977950)
 * I think you are correct, that will solve the issue for JS errors for sure,… but
   at the same time RabbitLoader will reduce its effect, and will end up with a 
   lot of blocking scripts causing a low-speed grade for the website. (The main 
   reason I tried the RabbitLoader is to fix blocking scripts )
 * Thank you for your response [@abhishekgr](https://wordpress.org/support/users/abhishekgr/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Payment Gateway for PayPal Pro & PayPal Checkout for WooCommerce] Missing “item name” inside PayPal account transaction details](https://wordpress.org/support/topic/missing-item-name-inside-paypal-account-transaction-details/)
 *  Thread Starter [King Pangilinan](https://wordpress.org/support/users/kingpg/)
 * (@kingpg)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/missing-item-name-inside-paypal-account-transaction-details/#post-12962266)
 * Your Welcome, I’m glad I can help 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Payment Gateway for PayPal Pro & PayPal Checkout for WooCommerce] Missing “item name” inside PayPal account transaction details](https://wordpress.org/support/topic/missing-item-name-inside-paypal-account-transaction-details/)
 *  Thread Starter [King Pangilinan](https://wordpress.org/support/users/kingpg/)
 * (@kingpg)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/missing-item-name-inside-paypal-account-transaction-details/#post-12888869)
 * Fixed it by replacing the whole function custom_get_additional_info_woo to below
   code
 *     ```
           protected function custom_get_additional_info_woo($def_arr) {
       	   global $woocommerce;
             $em_cart_total = $woocommerce->cart->cart_contents_total;
   
            $custom_payment_info_arr = $def_arr;
   
             $items = $woocommerce->cart->get_cart();
   
             $c = 0;
   
             foreach($items as $item => $values) { 
   
               $title_key = 'L_NAME' . $c;
               $amt_key = 'L_AMT' . $c;
               $qty_key = 'L_QTY' . $c;
   
                 $_product =  wc_get_product( $values['data']->get_id()); 
   
                 $_prod_title = $_product->get_title();
                 $_prod_quantity = $values['quantity'];
                 $_prod_price = get_post_meta($values['product_id'] , '_price', true);
   
               $custom_payment_info_arr[$title_key] = $_prod_title;
               $custom_payment_info_arr[$qty_key] = $_prod_quantity;
               $custom_payment_info_arr[$amt_key] = $_prod_price;
   
               $c++;
   
             }
   
             return $custom_payment_info_arr;
   
           }
   
   
           protected function create_paypal_request() {
       	//API Reference - https://developer.paypal.com/docs/classic/api/merchant/DoDirectPayment_API_Operation_NVP/
   
       	if ( $this->order AND $this->order != null ) {
       	    $def_arr = array(
       		'PAYMENTACTION'	 => $this->PAYPAL_NVP_PAYMENTACTION,
       		'VERSION'	 => $this->PAYPAL_NVP_API_VERSION,
       		'METHOD'	 => $this->PAYPAL_NVP_METHOD,
       		'PWD'		 => $this->apipassword,
       		'USER'		 => $this->apiusername,
       		'SIGNATURE'	 => $this->apisigniture,
       		'AMT'		 => $this->order->get_total(),
       		'ITEMAMT'		 => $this->order->get_total(),
       		'FIRSTNAME'	 => $this->order->get_billing_first_name(),
       		'LASTNAME'	 => $this->order->get_billing_last_name(),
       		'STREET'	 => $this->order->get_billing_address_1(),
       		'CITY'		 => $this->order->get_billing_city(),
       		'STATE'		 => $this->order->get_billing_state(),
       		'ZIP'		 => $this->order->get_billing_postcode(),
       		'COUNTRYCODE'	 => $this->order->get_billing_country(),
       		'SHIPTONAME'	 => $this->order->get_shipping_first_name() . " " . $this->order->get_shipping_last_name(),
       		'SHIPTOSTREET'	 => $this->order->get_shipping_address_1(),
       		'SHIPTOSTREET2'	 => $this->order->get_shipping_address_2(),
       		'SHIPTOCITY'	 => $this->order->get_shipping_city(),
       		'SHIPTOSTATE'	 => $this->order->get_shipping_state(),
       		'SHIPTOZIP'	 => $this->order->get_shipping_postcode(),
       		'SHIPTOCOUNTRY'	 => $this->order->get_shipping_country(),
       		'IPADDRESS'	 => $_SERVER[ 'REMOTE_ADDR' ],
       		'CREDITCARDTYPE' => $_POST[ 'billing_cardtype' ],
       		'ACCT'		 => $_POST[ 'billing_credircard' ],
       		'CVV2'		 => $_POST[ 'billing_ccvnumber' ],
       		'EXPDATE'	 => sprintf( '%s%s', $_POST[ 'billing_expdatemonth' ], $_POST[ 'billing_expdateyear' ] ),
       		'STREET'	 => sprintf( '%s, %s', $_POST[ 'billing_address_1' ], $_POST[ 'billing_address_2' ] ),
       		'CURRENCYCODE'	 => get_woocommerce_currency(),
       		'INVNUM'	 => $this->order->get_order_number(),
       		'BUTTONSOURCE'	 => 'TipsandTricks_SP',
       	    );
   
       	    $def_arr = $this->custom_get_additional_info_woo($def_arr);
       	    return $def_arr;
       	}
       	return false;
           }
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)