Posts

Showing posts from July, 2022

Get Woocommerce order meta by order id

  $order = wc_get_order( $orderid );         $returnurl = $order->get_checkout_order_received_url().'&status=ev';         foreach ( $order->get_items() as $item_id => $item ) {        $start = $item->get_meta( 'start_date', true );    $end = $item->get_meta( 'end_date', true );    $packageName = $item->get_meta( 'packageName', true );    }

Store Elementer Data To Custom Place

 // A send custom WebHook add_action( 'elementor_pro/forms/new_record', function( $record, $handler ) {     //make sure its our form     $form_name = $record->get_form_settings( 'form_name' );     // Replace MY_FORM_NAME with the name you gave your form     if ( 'טופס חדש' !== $form_name ) {         return;     }     $raw_fields = $record->get( 'fields' );     $fields = [];     foreach ( $raw_fields as $id => $field ) {         $fields[ $id ] = $field['value'];     } $gdurl = site_url('videolab/sheet.php'); wp_remote_post( $gdurl, [ 'body' => $fields, ]);     }, 10, 2 );

PHP Mailer code

  $result = ""; $mailboddy='Name: '.$usr_name.'<br/>'; $mailboddy.='Email: '.$usr_email.'<br/>'; $mailboddy.='Phone: '.$usr_phone.'<br/>'; $mailboddy.='Script Length: '.$script_length.'<br/>'; $mailboddy.='Usage: '.$use.'<br/>'; require get_template_directory() . '/classes/class.phpmailer.php'; $phpmailer = new PHPMailer; $phpmailer->IsSMTP(); //Sets Mailer to send message using SMTP $phpmailer->Host = 'smtp.gmail.com'; //Sets the SMTP hosts of your Email hosting, this for Godaddy $phpmailer->Port = '465'; //Sets the default SMTP server port $phpmailer->SMTPAuth = true; //Sets SMTP authentication. Utilizes the Username and Password variables $phpmailer->Username = 'pradeep.webiwit@gmail.com'; //Sets SMTP username $phpmailer->Passw...