Save custom price radio button value in cart and display it on Cart page Woocommerce

I have added custom price on woocommerce single product page using the code below on my theme’s functions php:

<?php // Output the Custom field in Product pages add_action("woocommerce_before_add_to_cart_button", "options_on_single_product", 1); function options_on_single_product(){  ?> <ul class="pricing-options"> <li> <div class="custom-radio"> <input type="radio" id="opt1" class="" name="filter_opt" checked> <label for="opt1" data-price="<?php echo wc_price( $  price ) ;?>"> <span class="circle"></span>Single Site License </label> </div>  <p>Nunc placerat mi id nisi interdum is mollis. Praesent pharetra, justo ut sceleris que      the mattis, leo quam.</p> </li>  <li> <div class="custom-radio"> <input type="radio" id="opt2" class="" name="filter_opt"> <label for="opt2" data-price="<?php echo wc_price( $  price*3 ) ;?>"> <span class="circle"></span>2 Sites License</label>  </div>  <p>Nunc placerat mi id nisi interdum is mollis. Praesent pharetra, justo ut sceleris que         the mattis, leo quam.</p> </li> </ul> <?php } 

Now i want to display the selected option value on cart page. Please help me to do this. Thanks

display posts on elementor widget

I am trying to display posts in a Elementor widget.selection section of Post type seems on settings but there is no content or else command on page.What is my mistake?

use \Elementor\Controls_Manager;   //paste    /**  * Get All POst Types  * @return array  */     class Elementor_oEmbed_Widget extends \Elementor\Widget_Base {  //paste      public function eael_get_all_types_post()     {         $  posts = get_posts([             'post_type' => 'any',             'post_style' => 'all_types',             'post_status' => 'publish',             'posts_per_page' => '-1',         ]);          if (!empty($  posts)) {             return wp_list_pluck($  posts, 'post_title', 'ID');         }          return [];     }     $  this->add_control(     'post_type',     [         'label' => __('Source', 'plugin-name'),         'type' => Controls_Manager::SELECT,         'options' => get_post_types(['public' => true, 'show_in_nav_menus' => true], 'objects'),            // 'default' => key($  this->post_types),     ] );  $  this->add_control(     'posts_ids',     [         'label' => __('Search & Select', 'plugin-name'),         'type' => Controls_Manager::SELECT2,         //'options' => $  this->eael_get_all_types_post(),         'label_block' => true,         'multiple' => true,         'condition' => [             'post_type' => 'by_id',         ],     ] );    protected function __render_template($  args, $  settings)     {          $  settings = $  this->get_settings_for_display();          $  html = wp_oembed_get($  settings['url']);          echo '<div class="oembed-elementor-widget">';          echo ($  html) ? $  html : $  settings['url'];          echo '</div>';            //paste            $  query = new \WP_Query($  args);         if($  query->have_posts()) {             while ($  query->have_posts()) {                 $  query->the_post();                 get_the_author_meta("display_name");             }          }         else         {echo "<div style=background:red> lsdkjf </div>";} 

RDP with self-signed cert requiring password before launching display

I’ve noticed that the search engine Shodan grabs screenshots from hosts running an RDP service, even if they offer a certificate.

To my understanding, the certificate is used to authentify the server, and encrypt the traffic sent and received (exactly like they are used in HTTPS), and thus should be irrelevant to the protection of hosts exposing RDP to the internet, but when I try to connect to such a service using xfreerdp, I get prompted for a password before I get to where the screenshot was taken, and then the error message : freerdp_set_last_error ERRCONNECT_LOGON_FAILURE [0x00020014].

I read that Shodan does not try passwords, it just grabs screenshots from accessible targets without credentials How is Shodan able to grab such screenshots? or what does xfreerdp do instead of launching the RDP display?

Display all repeater subfield values from DB

Here is the thing – I’m working on a personal project which includes multiple custom fields (created via ACF). Few of them are repeater types.

What I want to achieve is to display 3 arrays/blocks of those repeater subfield values. For better understanding, I have this repeater field: open_workshops, and this field includes subfields: date, location, partnerships.

I want simply to show all values from those subfields stored in DB. Something like:

Open Workshops:

  • Date: Jan 2017, Feb 2017…Dec 2019 etc

  • Location: New York, Warsaw…

  • Partnerships: EY, Google..

What issues I’ve noticed – first of all, because of field type (repeater) it’s damn hard to find those values in the DB. Because its not a single field but ACF replicates their names, so instead of looking for single field: open_workshops_date i need somehow to find: open_workshops_0_date, open_workshops_1_date etc.

My initial code was:

  if( have_rows('open_workshops') ):         while ( have_rows('open_workshops') ) : the_row();             $  sub_value_1 = get_sub_field('date');         $  sub_value_2 = get_sub_field('location');         $  sub_value_3 = get_sub_field('partnerships');             echo '$  sub_value_1'; echo '$  sub_value_2'; echo '$  sub_value_3';          endwhile;     else :         // no rows found     endif; 

I’ve tried as well the suggestion from this post: Retrieving all data from repeater fields

but it shows nothing.

How to display “META” array in register_taxonomy

How do I get the “META” field to go off “META: []” for something filled in? I am using this code:

register_taxonomy( 'job_listing_category', 'job_listing', [             'labels' => [                 'name'              => _x( 'Categories', 'Category taxonomy labels', 'my-listing' ),                 'singular_name'     => _x( 'Category', 'Category taxonomy labels', 'my-listing' ),                 'menu_name'         => _x( 'Categories', 'Category taxonomy labels', 'my-listing' ),                 'search_items'      => _x( 'Search Categories', 'Category taxonomy labels', 'my-listing' ),                 'all_items'         => _x( 'All Categories', 'Category taxonomy labels', 'my-listing' ),                 'parent_item'       => _x( 'Parent Category', 'Category taxonomy labels', 'my-listing' ),                 'parent_item_colon' => _x( 'Parent Category:', 'Category taxonomy labels', 'my-listing' ),                 'edit_item'         => _x( 'Edit Category', 'Category taxonomy labels', 'my-listing' ),                 'update_item'       => _x( 'Update Category', 'Category taxonomy labels', 'my-listing' ),                 'add_new_item'      => _x( 'Add New Category', 'Category taxonomy labels', 'my-listing' ),                 'new_item_name'     => _x( 'New Category Name', 'Category taxonomy labels', 'my-listing' ),             ],             'rewrite' => [                 'slug' => $  permalink_structure['category_base'],                 'with_front'   => false,                 'hierarchical' => false,             ],             'hierarchical'          => true,             'update_count_callback' => '_update_post_term_count',             'show_ui'               => true,             'show_tagcloud'         => false,             'public'                => true,             'show_in_rest'          => true,         ] ); 

How can I toggle display of individual items in a Show list?

I have several ListLinePlot features I’m overlaying on one image using Show. I’m using the Manipulate function to turn on one at a time, but I’d like to be able to use Manipulate to toggle the individual Show images on/off. Is there any way to create a Manipulate function that would allow this?

plotA = ListLinePlot[{{{-2000, 500}, {-10, 0}, {10, 0}, {2000, 1800}}}, PlotStyle -> Green, PlotRange -> {{-2000, 2000}, {-400, 4000}}, AspectRatio -> Automatic];  plotB = ListLinePlot[{{-800, 4000}, {-300, 200}, {0, 3000}, {300, 200}, {800, 4000}}, PlotRange -> {{-2000, 2000}, {-400, 4000}}, AspectRatio -> Automatic, PlotStyle -> Blue];  plotC = ListLinePlot[{{-1000, 3000}, {-600, 400}, {0, 1600}, {600, 400}, {1000, 3000}}, PlotRange -> {{-2000, 2000}, {-400, 4000}}, AspectRatio -> Automatic, PlotStyle -> Orange];  Show[plotA, plotB, plotC] 

Is there any way to have a Manipulate object that could toggle each of these on/off individually so one, two, all, or none would be displayed by the Show function?

This is the code I’ve been able to work with, but again, I can only show one plot at a time this way.

Manipulate[  Show[a], {{a, plotA, ""}, {plotA -> "plot a", plotB -> "plot b",     plotC -> "plot c"}}] 

Is there a way to add a featured image for the product to show in the product listings, but display another image as the product image?

I want to show a different image of products listing on the home page of the site, not the featured image but when customers click on the products then it should show the featured image on the product page. The site is on woocoommerce is there any way to do this. Thanks

how to display Sin[Subscript[\alpha,i]/2] as $s_{bar{\alpha}_2}$ using e.g., Makeboxes?

I learnt that we can use Makeboxes to display Sin[\alpha_i] as $ s_{\alpha_i}$ as follows:

  (*MakeBoxes[Sin[Subscript[\[Alpha],i_]],StandardForm]:=  MakeBoxes[Subscript[Subscript["s",\[Alpha]],i],StandardForm] 

but can’t find a way to make Sin[Subscript[[Alpha],i]/2] display as $ s_{\bar{\alpha}_2}$ , regardless of in fraction form or in $ a/b$ form. I have been looking for this for quite a long time, but with no luck. I checked the documentation, but can’t understand how Makeboxes works, especially in this context.

Could someone help to produce such a way so that it can take effect on both calculations involving fraction form or $ a/b$ form? It’d be even better if some explanation on how to do it is provided.

How to display a table based on data from a custom content type with custom fields

I have created a new content type called “casinos” with the following custom fields:

Bonus Offer Rating Score Aff Link Casino logo 

I created 10 posts of “casino” type which contains information about each casino. I now want to display a table with these details in on my homepage so that whatever I do to these 10 casinos, in terms of changes in the future, the table will always be generated from this data.

I cannot even find a plugin to do this or any information at all. Anyone know where I would start with this or this a custom code mission?

An example of how I want this to look on the front end is here:

enter image description here